From 4144815ed72781de4421a5ee0a8e968c363cd172 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 14 Oct 2010 14:20:02 +0100 Subject: [PATCH 1/3] Show debug output whenever InstallPrinterDrivers is called. Hopefully this will get to the bottom of bug #633227. --- ...-printer-InstallPrinterDrivers-debug.patch | 43 +++++++++++++++++++ system-config-printer.spec | 9 +++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-InstallPrinterDrivers-debug.patch diff --git a/system-config-printer-InstallPrinterDrivers-debug.patch b/system-config-printer-InstallPrinterDrivers-debug.patch new file mode 100644 index 0000000..d1df4ac --- /dev/null +++ b/system-config-printer-InstallPrinterDrivers-debug.patch @@ -0,0 +1,43 @@ +diff -up system-config-printer-1.2.5/installdriver.py.InstallPrinterDrivers-debug system-config-printer-1.2.5/installdriver.py +--- system-config-printer-1.2.5/installdriver.py.InstallPrinterDrivers-debug 2010-10-12 17:03:22.000000000 +0100 ++++ system-config-printer-1.2.5/installdriver.py 2010-10-14 14:09:49.205869035 +0100 +@@ -22,6 +22,7 @@ + import dbus + import dbus.glib + import dbus.service ++from debug import debugprint + + class PrinterDriversInstaller(dbus.service.Object): + DBUS_PATH = "/com/redhat/PrinterDriversInstaller" +@@ -43,8 +44,12 @@ class PrinterDriversInstaller(dbus.servi + obj = bus.get_object ("org.freedesktop.PackageKit", + "/org/freedesktop/PackageKit") + proxy = dbus.Interface (obj, "org.freedesktop.PackageKit.Modify") +- proxy.InstallPrinterDrivers (0, ["MFG:%s;MDL:%s;" % (mfg, mdl)], +- "hide-finished", ++ xid = 0 ++ resources = ["MFG:%s;MDL:%s;" % (mfg, mdl)] ++ interaction = "hide-finished" ++ debugprint ("Calling InstallPrinterDrivers (%s, %s, %s)" % ++ (repr (xid), repr (resources), repr (interaction))) ++ proxy.InstallPrinterDrivers (xid, resources, interaction, + reply_handler=reply_handler, + error_handler=error_handler, + timeout=3600) +diff -up system-config-printer-1.2.5/ppdsloader.py.InstallPrinterDrivers-debug system-config-printer-1.2.5/ppdsloader.py +--- system-config-printer-1.2.5/ppdsloader.py.InstallPrinterDrivers-debug 2010-10-13 13:11:16.000000000 +0100 ++++ system-config-printer-1.2.5/ppdsloader.py 2010-10-14 14:09:49.207994422 +0100 +@@ -163,8 +163,11 @@ class PPDsLoader: + obj = self._bus.get_object ("org.freedesktop.PackageKit", + "/org/freedesktop/PackageKit") + proxy = dbus.Interface (obj, "org.freedesktop.PackageKit.Modify") +- proxy.InstallPrinterDrivers (xid, [self._device_id], +- "hide-finished", ++ resources = [self._device_id] ++ interaction = "hide-finished" ++ debugprint ("Calling InstallPrinterDrivers (%s, %s, %s)" % ++ (repr (xid), repr (resources), repr (interaction))) ++ proxy.InstallPrinterDrivers (xid, resources, interaction, + reply_handler=self._packagekit_reply, + error_handler=self._packagekit_error, + timeout=3600) diff --git a/system-config-printer.spec b/system-config-printer.spec index 468c658..9b41407 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: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -16,6 +16,7 @@ Source0: http://cyberelk.net/tim/data/system-config-printer/1.2/%{name}-%{versio 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 Patch101: pysmbc-doczip.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -75,6 +76,9 @@ printers. %prep %setup -q -a 1 -a 2 +# Show debug output whenever InstallPrinterDrivers is called. +%patch1 -p1 -b .InstallPrinterDrivers-debug + pushd pysmbc-%{pysmbc_version} %patch101 -p1 -b .doczip popd @@ -198,6 +202,9 @@ rm -rf %buildroot exit 0 %changelog +* Thu Oct 14 2010 Tim Waugh - 1.2.5-2 +- Show debug output whenever InstallPrinterDrivers is called. + * Wed Oct 13 2010 Tim Waugh - 1.2.5-1 - 1.2.5: - CMD-field matching for PPDs (bug #630058). From 5263490c28b0d6386536c69e32a6c2c058853860 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 14 Oct 2010 14:21:04 +0100 Subject: [PATCH 2/3] Added upstream key for pysmbc. --- upstream-key-pysmbc.gpg | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 upstream-key-pysmbc.gpg diff --git a/upstream-key-pysmbc.gpg b/upstream-key-pysmbc.gpg new file mode 100644 index 0000000..666b4a9 --- /dev/null +++ b/upstream-key-pysmbc.gpg @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v2.0.14 (GNU/Linux) + +mQGiBEqKBDsRBADje4pZPDB+9ZdAjdzQ0O+OnNkoYj0TDGDRxcGZA1l9F2dRs9vL +SRsp+q4zZqRxAo4oMlNzcXZC8/hMHT11N1k8oNssBN/thKafjLRa5veA6v+9rAIS +Smx+JXwO6BsbBscKwq2fdf9QJWBbfUAEBfDFNrYhNtQKcY4YWgfT+b1JawCg2QDq +CFnCE7JzfcspKKBg4AYS/ucD/1evuUhrZZf9wpxNfd/fUEBfURM7+Oew4+mYqPSh +Ru5Sqk5DIoq2seZ0WHfh89Lbh2QqQh81saRUFoh6r/d0BSw9ekWY0iKdkrUw3pKW +ECSc6DNF0sWYBinc9CALYxXO/kYVHhMXnLZwpaaND8Mvgrcw8gKr7LRTyQm7zefk +60Q5A/9ywy6rL6Cj1RpQVDOC0LA+oJkQFaZXyPW1fQBTdLyATsXCuNvsv1eQNXt4 +4n4uoULtPFqgwztQyvAxQ/91+AWCLUU6JHQ97Ar+fZ1DMOET0eB+39JYwfXdK9PW +t2fTbnIbo+3djPT0f1DORwWfWO22u6pwKk//93PE16jJJMEVerQlVHN1a2FzYSBI +YW1hbm8gPGhhbWFub0Bvc3N0ZWNoLmNvLmpwPohgBBMRAgAgBQJKigQ7AhsDBgsJ +CAcDAgQVAggDBBYCAwECHgECF4AACgkQFr7RAWBpvlWPMACfYHIUHkR1QwP2QEJY +FuYexm16a4EAoNHjSi2CdcrAhzWgPTXAMlyUw91XuQINBEqKBDsQCADkJTHSBj0+ +OR61XS29KMk9wbVpk9rCNc4iIyYj7hSR6fed56eEyKGkKfuY6b/joCwn9SAu+vX5 +r80buZFpToS5+yY1MKioOQGqtYUCctUlqRPOUG3chrsxAnWsFdaJh+T5gCfElI9v +yqlQQT4VfTYGXc7rmP0FyI/3uQUNdKm2E4jdqann6NKgjZ1KNjnYnkGcLx3bOkbY +H9zxhGOuHo+ZV2dqXH2W2JpJTPFSUIuIuEEU2lNJAEjE+6C/wLdpQWIEi8k8tEKF +2ERe024sXM1nQkRoQ4LP1ByOhJ5pytMwxnj5RqTVhWlN56g4TvYMTD0iEY50udR6 +o8toGgTd/y4HAAMHCACX+zGFo+ykMTzIcbPQWM/YD+jOrZhBz7ie7XSMS6NWyJS4 +PKC5JKAHyR/gEjVfBaiOkWxrL5aLgQ3ejrlzqzjugfpOMWU0Rwzfi4rkTSadhqYM +PZ4OPoro/FqPayneuPdRlw+HaE2KJzpCMWNiPVhU4zjpx80MDKFNgBatQaMaOtuW +jrAehmpAdgUNcjy06Iq9mF+lbvdNKoMq9KlIhbJrWx6s+P60I+6Po39CEPE/4Q8L +SQBYZ52bXSCbPc2FPPalTZrAlVyN/VI0mXATYqGvqEoKhmWd7EY2iVWDVR+c2YG+ +6fyECsghocK84uhVLOkyB4pS/5r74z52Uu1xDjHRiEkEGBECAAkFAkqKBDsCGwwA +CgkQFr7RAWBpvlUREgCgw6jTkvP26vYqRXt6WzD4XEP+sToAn1dAgtJS4CHcyOcD +WXLnBppT71IG +=12o+ +-----END PGP PUBLIC KEY BLOCK----- From 2bc4b4d7156b538d682f3bae4089d3e466977f3f Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 14 Oct 2010 16:30:59 +0100 Subject: [PATCH 3/3] 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 deletion(-) create mode 100644 system-config-printer-mfg-mdl.patch 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 - 1.2.5-3 +- Always use MFG and MDL fields for InstallPrinterDrivers interface + (bug #643073). + * Thu Oct 14 2010 Tim Waugh - 1.2.5-2 - Show debug output whenever InstallPrinterDrivers is called.