Show debug output whenever InstallPrinterDrivers is called.

Hopefully this will get to the bottom of bug #633227.
This commit is contained in:
Tim Waugh 2010-10-14 14:20:02 +01:00
parent 046489275c
commit 4144815ed7
2 changed files with 51 additions and 1 deletions

View File

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

View File

@ -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 <twaugh@redhat.com> - 1.2.5-2
- Show debug output whenever InstallPrinterDrivers is called.
* Wed Oct 13 2010 Tim Waugh <twaugh@redhat.com> - 1.2.5-1
- 1.2.5:
- CMD-field matching for PPDs (bug #630058).