From 44b71e7e458e93c066b63cb265053e7d5156397e Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 15 Dec 2010 10:58:51 +0000 Subject: [PATCH] Enable D-Bus threading (and require pygobject2) (bug #600932). --- hplip-dbus-threads.patch | 16 ++++++++++++++++ hplip.spec | 8 +++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 hplip-dbus-threads.patch diff --git a/hplip-dbus-threads.patch b/hplip-dbus-threads.patch new file mode 100644 index 0000000..ceae607 --- /dev/null +++ b/hplip-dbus-threads.patch @@ -0,0 +1,16 @@ +diff -up hplip-3.10.9/toolbox.py.dbus-threads hplip-3.10.9/toolbox.py +--- hplip-3.10.9/toolbox.py.dbus-threads 2010-12-15 10:54:17.178739842 +0000 ++++ hplip-3.10.9/toolbox.py 2010-12-15 10:57:09.923712662 +0000 +@@ -100,8 +100,11 @@ if ui_toolkit == 'qt3': + try: + from dbus import SessionBus + import dbus.service +- from dbus.mainloop.glib import DBusGMainLoop ++ from dbus.mainloop.glib import DBusGMainLoop, threads_init + from gobject import MainLoop ++ import glib ++ glib.threads_init(); ++ dbus.mainloop.glib.threads_init() + except ImportError: + log.error("Unable to load dbus - Automatic status updates in HPLIP Device Manager will be disabled.") + disable_dbus = True diff --git a/hplip.spec b/hplip.spec index 0d16ca3..001c70c 100644 --- a/hplip.spec +++ b/hplip.spec @@ -46,6 +46,7 @@ Patch29: hplip-addprinter.patch Patch30: hplip-dbus-exception.patch Patch31: hplip-hpaio-segfault.patch Patch32: hplip-newline.patch +Patch33: hplip-dbus-threads.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -102,6 +103,7 @@ Group: Applications/System License: BSD Requires: PyQt4 Requires: python-reportlab +Requires: pygobject2 Requires(post): desktop-file-utils >= 0.2.92 Requires(postun): desktop-file-utils >= 0.2.92 Requires: %{name} = %{version}-%{release} @@ -284,6 +286,9 @@ done # Another missing newline in filter output (Ubuntu #418053). %patch32 -p1 -b .newline +# Enable D-Bus threading (and require pygobject2) (bug #600932). +%patch33 -p1 -b .dbus-threads + sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ prnt/drv/hpcups.drv.in @@ -510,7 +515,8 @@ fi %postun libs -p /sbin/ldconfig %changelog -* Tue Dec 14 2010 Tim Waugh - 3.10.9-9 +* Wed Dec 15 2010 Tim Waugh - 3.10.9-9 +- Enable D-Bus threading (and require pygobject2) (bug #600932). - Fixed incorrect signal name in setup dialog (bug #653626). - Another missing newline in filter output (Ubuntu #418053). - Prevent hpaio segfaulting on invalid URIs (bug #649092).