From 192aeb7de214dcfdd120eb3a8a377c0733d09d68 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 22 Feb 2010 17:26:38 +0000 Subject: [PATCH] - Removed Device ID hacks for Kyocera and HP. This avoids a false positive for the incorrect-Device-ID warning. --- ...em-config-printer-no-device-id-hacks.patch | 24 +++++++++++++++++++ system-config-printer.spec | 8 ++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-no-device-id-hacks.patch diff --git a/system-config-printer-no-device-id-hacks.patch b/system-config-printer-no-device-id-hacks.patch new file mode 100644 index 0000000..6914125 --- /dev/null +++ b/system-config-printer-no-device-id-hacks.patch @@ -0,0 +1,24 @@ +diff -up system-config-printer-1.1.92/cupshelpers/ppds.py.no-device-id-hacks system-config-printer-1.1.92/cupshelpers/ppds.py +--- system-config-printer-1.1.92/cupshelpers/ppds.py.no-device-id-hacks 2010-02-22 17:16:47.012355185 +0000 ++++ system-config-printer-1.1.92/cupshelpers/ppds.py 2010-02-22 17:17:57.924354751 +0000 +@@ -900,20 +900,10 @@ class PPDs: + if not id: + continue + +- # Fix up broken Kyocera IDs +- v = id.find (":Model") +- if v != -1: +- id = id[:v] + ';' + id[v + 1:] +- + id_dict = parseDeviceID (id) + lmfg = id_dict['MFG'].lower () + lmdl = id_dict['MDL'].lower () + +- # Consider "HP" and "Hewlett-Packard" as equal, as the ID returned +- # by the CUPS "usb" backend and HPLIP's "hp" backend are different +- if lmfg == "hewlett-packard": +- lmfg = "hp" +- + bad = False + if len (lmfg) == 0: + _debugprint ("Missing MFG field for %s" % ppdname) diff --git a/system-config-printer.spec b/system-config-printer.spec index 9175b14..24f217f 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -7,7 +7,7 @@ Summary: A printer administration tool Name: system-config-printer Version: 1.1.92 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -19,6 +19,7 @@ Patch1: system-config-printer-no-epydoc.patch Patch2: system-config-printer-lowercase-mfg-mdl.patch Patch3: system-config-printer-device-ids-warning.patch Patch4: system-config-printer-cupsGetPPD2.patch +Patch5: system-config-printer-no-device-id-hacks.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -81,6 +82,7 @@ printers. %patch2 -p1 -b .lowercase-mfg-mdl %patch3 -p1 -b .device-ids-warning %patch4 -p1 -b .cupsGetPPD2 +%patch5 -p1 -b .no-device-id-hacks %build %configure --with-udev-rules --with-polkit-1 @@ -196,6 +198,10 @@ rm -rf %buildroot exit 0 %changelog +* Mon Feb 22 2010 Tim Waugh - 1.1.92-4 +- Removed Device ID hacks for Kyocera and HP. This avoids a false + positive for the incorrect-Device-ID warning. + * Mon Feb 22 2010 Jiri Popelka 1.1.92-3 - Catch RuntimeError in statereason.py when cupsGetPPD2 fails (bug #566938).