- Show CMD field in check-device-ids.py.

This commit is contained in:
Tim Waugh 2010-03-19 11:44:57 +00:00
parent 25820ee4cd
commit 907e79bf08
2 changed files with 31 additions and 1 deletions

View File

@ -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 ()]

View File

@ -7,7 +7,7 @@
Summary: A printer administration tool Summary: A printer administration tool
Name: system-config-printer Name: system-config-printer
Version: 1.2.0 Version: 1.2.0
Release: 2%{?dist} Release: 3%{?dist}
License: GPLv2+ License: GPLv2+
URL: http://cyberelk.net/tim/software/system-config-printer/ URL: http://cyberelk.net/tim/software/system-config-printer/
Group: System Environment/Base 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 Patch1: system-config-printer-no-epydoc.patch
Patch2: system-config-printer-lowercase-mfg-mdl.patch Patch2: system-config-printer-lowercase-mfg-mdl.patch
Patch3: system-config-printer-cdi-no-drivers.patch Patch3: system-config-printer-cdi-no-drivers.patch
Patch4: system-config-printer-cdi-cmd.patch
BuildRequires: cups-devel >= 1.2 BuildRequires: cups-devel >= 1.2
BuildRequires: python-devel >= 2.4 BuildRequires: python-devel >= 2.4
@ -88,6 +89,9 @@ printers.
# (bug #574827). # (bug #574827).
%patch3 -p1 -b .cdi-no-drivers %patch3 -p1 -b .cdi-no-drivers
# Show CMD field in check-device-ids.py.
%patch4 -p1 -b .cdi-cmd
%build %build
%configure --with-udev-rules %configure --with-udev-rules
@ -203,6 +207,9 @@ rm -rf %buildroot
exit 0 exit 0
%changelog %changelog
* Fri Mar 19 2010 Tim Waugh <twaugh@redhat.com> - 1.2.0-3
- Show CMD field in check-device-ids.py.
* Thu Mar 18 2010 Tim Waugh <twaugh@redhat.com> - 1.2.0-2 * Thu Mar 18 2010 Tim Waugh <twaugh@redhat.com> - 1.2.0-2
- Fixed traceback in check-driver-ids.py when no drivers are found - Fixed traceback in check-driver-ids.py when no drivers are found
(bug #574827). (bug #574827).