summaryrefslogtreecommitdiff
path: root/print/system-config-printer/files/patch-newprinter.py
blob: 0fe39ef6f94a4d6165033778a1c072153183b18c (plain) (blame)
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
36
37
38
39
40
41
42
43
44
45
46
47
--- newprinter.py.orig	2019-11-19 17:32:12.439573000 -0400
+++ newprinter.py	2019-11-19 17:37:00.087735000 -0400
@@ -1163,7 +1163,7 @@
                 if (self.device.id and
                     not self.device.type in ("socket", "lpd", "ipp",
                                              "http", "https", "bluetooth")):
-                    name = "%s %s" % (self.device.id_dict["MFG"], 
+                    name = "%s %s" % (self.device.id_dict["MFG"],
                                       self.device.id_dict["MDL"])
             except:
                 nonfatalException ()
@@ -1411,7 +1411,7 @@
         # Does the backend need to be installed?
         if (self.nextnptab_rerun == False and not self.searchedfordriverpackages and
                (self._host == 'localhost' or self._host[0] == '/') and
-               not os.access ("/usr/lib/cups/backend/smb", os.F_OK)):
+               not os.access ("%%PREFIX%%/libexec/cups/backend/smb", os.F_OK)):
             debugprint ("No smb backend so attempting install")
             try:
                 pk = installpackage.PackageKit ()
@@ -2174,7 +2174,7 @@
                 host = device.uri[s:s+e]
         # Try to get make and model via SNMP
         if host:
-            args = ["/usr/lib/cups/backend/snmp", host]
+            args = ["%%PREFIX%%/libexec/cups/backend/snmp", host]
             debugprint (host + ": " + repr(args))
             stdout = None
             try:
@@ -2382,7 +2382,7 @@
                     else:
                         device2.uri = "delete"
         devices = [x for x in devices if x.uri not in ("hp", "hpfax",
-                                                       "hal", "beh", "smb", 
+                                                       "hal", "beh", "smb",
                                                        "scsi", "http", "bjnp",
                                                        "delete")]
         newdevices = []
@@ -4212,7 +4212,7 @@
                 try:
                     # We want this to be in the current natural language,
                     # so we intentionally don't set LC_ALL=C here.
-                    p = subprocess.Popen (['/usr/bin/cupstestppd',
+                    p = subprocess.Popen (['%%PREFIX%%/bin/cupstestppd',
                                            '-rvv', filename],
                                           close_fds=True,
                                           stdin=subprocess.DEVNULL,