[system-config-printer/f13/master] Always use MFG and MDL fields for InstallPrinterDrivers interface (bug #643073).

Tim Waugh twaugh at fedoraproject.org
Thu Oct 14 15:31:22 UTC 2010


commit 2bc4b4d7156b538d682f3bae4089d3e466977f3f
Author: Tim Waugh <twaugh at redhat.com>
Date:   Thu Oct 14 16:30:59 2010 +0100

    Always use MFG and MDL fields for InstallPrinterDrivers interface (bug #643073).

 system-config-printer-mfg-mdl.patch |   21 +++++++++++++++++++++
 system-config-printer.spec          |   11 ++++++++++-
 2 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/system-config-printer-mfg-mdl.patch b/system-config-printer-mfg-mdl.patch
new file mode 100644
index 0000000..301e1a1
--- /dev/null
+++ b/system-config-printer-mfg-mdl.patch
@@ -0,0 +1,21 @@
+diff -up system-config-printer-1.2.5/ppdsloader.py.mfg-mdl system-config-printer-1.2.5/ppdsloader.py
+--- system-config-printer-1.2.5/ppdsloader.py.mfg-mdl	2010-10-14 14:09:49.207994422 +0100
++++ system-config-printer-1.2.5/ppdsloader.py	2010-10-14 16:21:15.821926650 +0100
+@@ -133,6 +133,8 @@ class PPDsLoader:
+             if (status != ppds.STATUS_SUCCESS and
+                 self._packagekit_queried == False and
+                 self._local_cups == True):
++                self._gpk_device_id = "MFG:%s;MDL:%s;" % (devid_dict["MFG"],
++                                                          devid_dict["MDL"])
+                 self._query_packagekit ()
+                 self._packagekit_queried = True
+                 return
+@@ -163,7 +165,7 @@ class PPDsLoader:
+             obj = self._bus.get_object ("org.freedesktop.PackageKit",
+                                         "/org/freedesktop/PackageKit")
+             proxy = dbus.Interface (obj, "org.freedesktop.PackageKit.Modify")
+-            resources = [self._device_id]
++            resources = [self._gpk_device_id]
+             interaction = "hide-finished"
+             debugprint ("Calling InstallPrinterDrivers (%s, %s, %s)" %
+                         (repr (xid), repr (resources), repr (interaction)))
diff --git a/system-config-printer.spec b/system-config-printer.spec
index 9b41407..bde468e 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.5
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPLv2+
 URL: http://cyberelk.net/tim/software/system-config-printer/
 Group: System Environment/Base
@@ -17,6 +17,7 @@ Source1: http://cyberelk.net/tim/data/pycups/pycups-%{pycups_version}.tar.bz2
 # Python bindings for libsmbclient
 Source2: http://pypi.python.org/packages/source/p/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2
 Patch1: system-config-printer-InstallPrinterDrivers-debug.patch
+Patch2: system-config-printer-mfg-mdl.patch
 Patch101: pysmbc-doczip.patch
 BuildRequires: cups-devel >= 1.2
 BuildRequires: python-devel >= 2.4
@@ -79,6 +80,10 @@ printers.
 # Show debug output whenever InstallPrinterDrivers is called.
 %patch1 -p1 -b .InstallPrinterDrivers-debug
 
+# Always use MFG and MDL fields for InstallPrinterDrivers interface
+# (bug #643073).
+%patch2 -p1 -b .mfg-mdl
+
 pushd pysmbc-%{pysmbc_version}
 %patch101 -p1 -b .doczip
 popd
@@ -202,6 +207,10 @@ rm -rf %buildroot
 exit 0
 
 %changelog
+* Thu Oct 14 2010 Tim Waugh <twaugh at redhat.com> - 1.2.5-3
+- Always use MFG and MDL fields for InstallPrinterDrivers interface
+  (bug #643073).
+
 * Thu Oct 14 2010 Tim Waugh <twaugh at redhat.com> - 1.2.5-2
 - Show debug output whenever InstallPrinterDrivers is called.
 


More information about the scm-commits mailing list