~ubuntu-branches/ubuntu/vivid/system-config-printer/vivid

« back to all changes in this revision

Viewing changes to debian/patches/33_dont-use-hp-makeuri-with-non-hp-printers.patch

  • Committer: Package Import Robot
  • Author(s): Till Kamppeter
  • Date: 2014-07-06 09:41:43 UTC
  • mfrom: (1.1.81)
  • Revision ID: package-import@ubuntu.com-20140706094143-yvp3kzo7ti1ghih8
Tags: 1.4.5+20140706-0ubuntu1
* New upstream release
   o GIT 1.4.x snapshot from 6 July 2014
   o Some codec fixes
   o Traceback fixes
   o IPv6 address entry fix
   o Auth info saving improvement
   o Some loop/hang bug fixes
   o Use LockButton for fewer auth dialogs
* 30_newprinter-driver-download-override-false-error-alarm.patch,
  33_dont-use-hp-makeuri-with-non-hp-printers.patch:
  Removed, included upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
diff -Nur -x '*.orig' -x '*~' system-config-printer-1.4.3+20140219/newprinter.py system-config-printer-1.4.3+20140219.new/newprinter.py
2
 
--- system-config-printer-1.4.3+20140219/newprinter.py  2014-04-28 23:16:02.996314521 +0200
3
 
+++ system-config-printer-1.4.3+20140219.new/newprinter.py      2014-04-28 23:16:18.492314936 +0200
4
 
@@ -2793,7 +2793,11 @@
5
 
                         device_dict['device-id'] = device.id
6
 
                         device_dict['device-location'] = device.location
7
 
 
8
 
-            if not hp_drivable and is_network and not remotecups:
9
 
+            if not hp_drivable and is_network and not remotecups and \
10
 
+               (not device.make_and_model or \
11
 
+                device.make_and_model == "Unknown" or \
12
 
+                device.make_and_model.lower ().startswith ("hp") or \
13
 
+                device.make_and_model.lower ().startswith ("hewlett")):
14
 
                 if (hasattr (physicaldevice, "dnssd_hostname") and \
15
 
                     physicaldevice.dnssd_hostname):
16
 
                     hpliphost = physicaldevice.dnssd_hostname
17
 
diff -Nur -x '*.orig' -x '*~' system-config-printer-1.4.3+20140219/probe_printer.py system-config-printer-1.4.3+20140219.new/probe_printer.py
18
 
--- system-config-printer-1.4.3+20140219/probe_printer.py       2014-01-06 18:31:49.000000000 +0100
19
 
+++ system-config-printer-1.4.3+20140219.new/probe_printer.py   2014-04-28 23:16:18.492314936 +0200
20
 
@@ -357,6 +357,14 @@
21
 
         debugprint ("lpd: done")
22
 
 
23
 
     def _probe_hplip (self):
24
 
+        if (self._cached_attributes.has_key ('device-make-and-model') and \
25
 
+            self._cached_attributes['device-make-and-model'] != "Unknown" and \
26
 
+            not self._cached_attributes['device-make-and-model'].lower ().startswith ("hp") and \
27
 
+            not self._cached_attributes['device-make-and-model'].lower ().startswith ("hewlett")):
28
 
+            debugprint ("hplip: no good (Non-HP printer: %s)" %
29
 
+                        self._cached_attributes['device-make-and-model'])
30
 
+            return
31
 
+
32
 
         null = file ("/dev/null", "r+")
33
 
         try:
34
 
             debugprint ("hplip: trying")