File: 53_usr_share_ppd_support.dpatch

package info (click to toggle)
cupsys 1.2.7-4%2Betch9
  • links: PTS
  • area: main
  • in suites: etch
  • size: 20,436 kB
  • ctags: 10,404
  • sloc: ansic: 97,130; cpp: 49,167; java: 6,199; sh: 4,723; makefile: 1,918; lisp: 232; perl: 145; python: 119; php: 28
file content (35 lines) | stat: -rw-r--r-- 1,184 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#! /bin/sh /usr/share/dpatch/dpatch-run
## 53_usr_share_ppd_support.dpatch by  <martin.pitt@ubuntu.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

@DPATCH@
diff -urNad cupsys-1.2.1~/scheduler/cups-driverd.c cupsys-1.2.1/scheduler/cups-driverd.c
--- cupsys-1.2.1~/scheduler/cups-driverd.c	2006-04-18 15:16:00.000000000 +0000
+++ cupsys-1.2.1/scheduler/cups-driverd.c	2006-06-18 07:13:15.000000000 +0000
@@ -302,10 +302,7 @@
     * Try opening the file...
     */
 
-    if ((datadir = getenv("CUPS_DATADIR")) == NULL)
-      datadir = CUPS_DATADIR;
-
-    snprintf(line, sizeof(line), "%s/model/%s", datadir, name);
+    snprintf(line, sizeof(line), "/usr/share/ppd/%s", name);
     if ((fp = cupsFileOpen(line, "r")) == NULL)
     {
       fprintf(stderr, "ERROR: [cups-driverd] Unable to open \"%s\" - %s\n",
@@ -459,11 +456,7 @@
 
   SortedPPDs = NumPPDs;
 
-  if ((cups_datadir = getenv("CUPS_DATADIR")) == NULL)
-    cups_datadir = CUPS_DATADIR;
-
-  snprintf(model, sizeof(model), "%s/model", cups_datadir);
-  load_ppds(model, "");
+  load_ppds("/usr/share/ppd", "");
 
  /*
   * Cull PPD files that are no longer present...