From 4144815ed72781de4421a5ee0a8e968c363cd172 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Oct 14 2010 13:20:02 +0000 Subject: Show debug output whenever InstallPrinterDrivers is called. Hopefully this will get to the bottom of bug #633227. --- 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).