From c6ceea48777294bc78f31e5b04e9811ac6838bd2 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 18 Jan 2010 16:59:32 +0000 Subject: [PATCH] - Don't rely on cups-pk-helper being around (bug #556170). --- clog1 | 4 +-- system-config-printer-async-fallback.patch | 36 ++++++++++++++++++++++ system-config-printer.spec | 3 ++ 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 system-config-printer-async-fallback.patch diff --git a/clog1 b/clog1 index 08f083f..53601e3 100644 --- a/clog1 +++ b/clog1 @@ -1,2 +1,2 @@ -* Wed Jan 6 2010 Tim Waugh - 1.1.16-3 -- Fixed pycups IPPRequest attribute handling bug. +* Mon Jan 18 2010 Tim Waugh - 1.1.16-9 +- Don't rely on cups-pk-helper being around (bug #556170). diff --git a/system-config-printer-async-fallback.patch b/system-config-printer-async-fallback.patch new file mode 100644 index 0000000..0739367 --- /dev/null +++ b/system-config-printer-async-fallback.patch @@ -0,0 +1,36 @@ +diff -up system-config-printer-1.1.16/asyncpk1.py.async-fallback system-config-printer-1.1.16/asyncpk1.py +--- system-config-printer-1.1.16/asyncpk1.py.async-fallback 2009-12-22 14:27:37.000000000 +0000 ++++ system-config-printer-1.1.16/asyncpk1.py 2010-01-18 16:53:36.820434799 +0000 +@@ -288,18 +288,24 @@ class PK1Connection: + def _call_with_pk (self, use_pycups, pk_method_name, pk_args, + reply_handler, error_handler, unpack_fn, + fallback_fn, args, kwds): +- asyncmethodcall = _PK1AsyncMethodCall (self._system_bus, self, +- pk_method_name, pk_args, +- reply_handler, error_handler, +- unpack_fn, fallback_fn, +- args, kwds) ++ if not use_pycups: ++ try: ++ asyncmethodcall = _PK1AsyncMethodCall (self._system_bus, self, ++ pk_method_name, pk_args, ++ reply_handler, ++ error_handler, ++ unpack_fn, fallback_fn, ++ args, kwds) ++ ++ debugprint ("Calling PK method %s" % pk_method_name) ++ asyncmethodcall.call () ++ except dbus.DBusException, e: ++ debugprint ("D-Bus call failed: %s" % repr (e)) ++ use_pycups = True + + if use_pycups: + return asyncmethodcall.call_fallback_fn () + +- debugprint ("Calling PK method %s" % pk_method_name) +- asyncmethodcall.call () +- + def _nothing_to_unpack (self): + return None + diff --git a/system-config-printer.spec b/system-config-printer.spec index 37939f3..4cceebc 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -27,6 +27,7 @@ Patch9: system-config-printer-ink-levels.patch Patch10: system-config-printer-auth-no-pw.patch Patch11: system-config-printer-copy-crash.patch Patch12: system-config-printer-check-still-connecting.patch +Patch13: system-config-printer-async-fallback.patch Patch101: pycups-request-readio.patch @@ -100,6 +101,7 @@ printers. %patch10 -p1 -b .auth-no-pw %patch11 -p1 -b .copy-crash %patch12 -p1 -b .check-still-connecting +%patch13 -p1 -b .async-fallback pushd pycups-%{pycups_version} %patch101 -p1 -b .request-readio @@ -221,6 +223,7 @@ exit 0 %changelog * Mon Jan 18 2010 Tim Waugh - 1.1.16-9 +- Don't rely on cups-pk-helper being around (bug #556170). - Avoid traceback when checking on connecting backends (bug #555552). * Mon Jan 11 2010 Tim Waugh - 1.1.16-8