From fd124d9dc4eca64d9e7bb624796fa111d7be036c Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 19 Mar 2010 12:59:13 +0000 Subject: [PATCH] - check-device-ids.py: Fixed driver-URI to filename mapping. --- system-config-printer-cdi-filename.patch | 21 +++++++++++++++++++++ system-config-printer.spec | 9 ++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-cdi-filename.patch diff --git a/system-config-printer-cdi-filename.patch b/system-config-printer-cdi-filename.patch new file mode 100644 index 0000000..e0fabb7 --- /dev/null +++ b/system-config-printer-cdi-filename.patch @@ -0,0 +1,21 @@ +diff -up system-config-printer-1.2.0/check-device-ids.py.cdi-filename system-config-printer-1.2.0/check-device-ids.py +--- system-config-printer-1.2.0/check-device-ids.py.cdi-filename 2010-03-19 12:39:49.195620887 +0000 ++++ system-config-printer-1.2.0/check-device-ids.py 2010-03-19 12:40:09.012748969 +0000 +@@ -115,16 +115,13 @@ makes = ppds.getMakes () + + def driver_uri_to_filename (uri): + schemeparts = uri.split (':', 2) +- if len (schemeparts) < 1: ++ if len (schemeparts) < 2: + return "/usr/share/cups/model/" + uri + + scheme = schemeparts[0] + if scheme != "drv": + return "/usr/lib/cups/driver/" + scheme + +- if len (schemeparts) < 2: +- return "" +- + rest = schemeparts[1] + rest = rest.lstrip ('/') + parts = rest.split ('/') diff --git a/system-config-printer.spec b/system-config-printer.spec index 11875b3..916b8a0 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: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -22,6 +22,7 @@ Patch2: system-config-printer-lowercase-mfg-mdl.patch Patch3: system-config-printer-cdi-no-drivers.patch Patch4: system-config-printer-cdi-cmd.patch Patch5: system-config-printer-kyocera-mita.patch +Patch6: system-config-printer-cdi-filename.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -96,6 +97,9 @@ printers. # The canonical name for Kyocera is Kyocera Mita. %patch5 -p1 -b .kyocera-mita +# check-device-ids.py: Fixed driver-URI to filename mapping. +%patch6 -p1 -b .cdi-filename + %build %configure --with-udev-rules @@ -211,6 +215,9 @@ rm -rf %buildroot exit 0 %changelog +* Fri Mar 19 2010 Tim Waugh - 1.2.0-4 +- check-device-ids.py: Fixed driver-URI to filename mapping. + * Fri Mar 19 2010 Tim Waugh - 1.2.0-3 - The canonical name for Kyocera is Kyocera Mita. - Show CMD field in check-device-ids.py.