From e2fb5cc4bc010a2e99df3fd0c6f863f6937562da Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 19 Mar 2010 11:44:41 +0000 Subject: [PATCH] - Show CMD field in check-device-ids.py. --- system-config-printer-cdi-cmd.patch | 23 +++++++++++++++++++++++ system-config-printer.spec | 9 ++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-cdi-cmd.patch diff --git a/system-config-printer-cdi-cmd.patch b/system-config-printer-cdi-cmd.patch new file mode 100644 index 0000000..f6f7c05 --- /dev/null +++ b/system-config-printer-cdi-cmd.patch @@ -0,0 +1,23 @@ +diff -up system-config-printer-1.2.0/check-device-ids.py.cdi-cmd system-config-printer-1.2.0/check-device-ids.py +--- system-config-printer-1.2.0/check-device-ids.py.cdi-cmd 2010-03-19 10:39:18.000000000 +0000 ++++ system-config-printer-1.2.0/check-device-ids.py 2010-03-19 10:39:55.011621602 +0000 +@@ -160,9 +160,16 @@ for device, attrs in devices.iteritems ( + else: + line = last + +- print "%s %s: MFG:%s;MDL:%s;" % (line, make_and_model, +- id_fields['MFG'], +- id_fields['MDL']) ++ cmd = id_fields['CMD'] ++ if cmd: ++ cmd = "CMD:%s;" % reduce (lambda x, y: x + ',' + y, cmd) ++ else: ++ cmd = "" ++ ++ print "%s %s: MFG:%s;MDL:%s;%s" % (line, make_and_model, ++ id_fields['MFG'], ++ id_fields['MDL'], ++ cmd) + + try: + drivers = ppds.ids[id_fields['MFG'].lower ()][id_fields['MDL'].lower ()] diff --git a/system-config-printer.spec b/system-config-printer.spec index 25db949..c705c7d 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.2.0 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -20,6 +20,7 @@ Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-no-epydoc.patch Patch2: system-config-printer-lowercase-mfg-mdl.patch Patch3: system-config-printer-cdi-no-drivers.patch +Patch4: system-config-printer-cdi-cmd.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -88,6 +89,9 @@ printers. # (bug #574827). %patch3 -p1 -b .cdi-no-drivers +# Show CMD field in check-device-ids.py. +%patch4 -p1 -b .cdi-cmd + %build %configure --with-udev-rules @@ -203,6 +207,9 @@ rm -rf %buildroot exit 0 %changelog +* Fri Mar 19 2010 Tim Waugh - 1.2.0-3 +- Show CMD field in check-device-ids.py. + * Thu Mar 18 2010 Tim Waugh - 1.2.0-2 - Fixed traceback in check-driver-ids.py when no drivers are found (bug #574827).