rpms/system-config-printer/F-12 system-config-printer-blacklist-graphtec.patch, NONE, 1.1 system-config-printer-canon-naming.patch, NONE, 1.1 system-config-printer-empty-nse.patch, NONE, 1.1 system-config-printer-threading-fixes.patch, NONE, 1.1 system-config-printer.spec, 1.372, 1.373
Tim Waugh
twaugh at fedoraproject.org
Mon Jun 28 15:16:41 UTC 2010
Author: twaugh
Update of /cvs/pkgs/rpms/system-config-printer/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv32363
Modified Files:
system-config-printer.spec
Added Files:
system-config-printer-blacklist-graphtec.patch
system-config-printer-canon-naming.patch
system-config-printer-empty-nse.patch
system-config-printer-threading-fixes.patch
Log Message:
* Mon Jun 28 2010 Tim Waugh <twaugh at redhat.com> - 1.1.19-3
- Threading fixes from upstream.
- Fixed Canon naming issues.
- Blacklist Graphtec devices (bug #547171).
- Handle empty notify-subscribed-event attribute (bug #606909).
system-config-printer-blacklist-graphtec.patch:
udev-add-printer | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
--- NEW FILE system-config-printer-blacklist-graphtec.patch ---
diff -up system-config-printer-1.1.19/udev/udev-add-printer.blacklist-graphtec system-config-printer-1.1.19/udev/udev-add-printer
--- system-config-printer-1.1.19/udev/udev-add-printer.blacklist-graphtec 2010-05-18 14:59:00.000000000 +0100
+++ system-config-printer-1.1.19/udev/udev-add-printer 2010-06-28 16:05:54.285009878 +0100
@@ -27,6 +27,10 @@ import sys
import traceback
from syslog import *
+MFR_BLACKLIST=[
+ "graphtec",
+ ]
+
def create_queue (c, printers, name, device_uri, ppdname, info):
# Make sure the name is unique.
namel = unicode (name.lower ())
@@ -67,6 +71,11 @@ def add_queue (device_id, device_uris, f
fax_basename: False if this is not a fax queue, else name prefix
"""
+ id_dict = cupshelpers.parseDeviceID (device_id)
+ if id_dict["MFG"].lower () in MFG_BLACKLIST:
+ syslog (LOG_DEBUG, "Ignoring blacklisted manufacturer %s", id_dict["MFG"])
+ return
+
syslog (LOG_DEBUG, "add_queue: URIs=%s" % device_uris)
if fax_basename != False:
notification = None
@@ -82,7 +91,6 @@ def add_queue (device_id, device_uris, f
syslog (LOG_DEBUG, "D-Bus method call failed: %s" % e)
notification = None
- id_dict = cupshelpers.parseDeviceID (device_id)
c = cups.Connection ()
ppds = cupshelpers.ppds.PPDs (c.getPPDs ())
(status, ppdname) = ppds.getPPDNameFromDeviceID (id_dict["MFG"],
system-config-printer-canon-naming.patch:
ppds.py | 2 ++
1 file changed, 2 insertions(+)
--- NEW FILE system-config-printer-canon-naming.patch ---
diff -up system-config-printer-1.1.19/cupshelpers/ppds.py.canon-naming system-config-printer-1.1.19/cupshelpers/ppds.py
--- system-config-printer-1.1.19/cupshelpers/ppds.py.canon-naming 2010-05-05 16:24:35.000000000 +0100
+++ system-config-printer-1.1.19/cupshelpers/ppds.py 2010-06-28 16:04:10.366883164 +0100
@@ -199,6 +199,8 @@ def ppdMakeModelSplit (ppd_make_and_mode
" zxs", # hpcups
" pcl3", # hpcups
"_bt",
+ " pcl", # Canon CQue
+ " ufr ii", # Canon UFR II
","]:
s = modell.find (suffix)
if s != -1:
system-config-printer-empty-nse.patch:
monitor.py | 6 ++++++
1 file changed, 6 insertions(+)
--- NEW FILE system-config-printer-empty-nse.patch ---
diff -up system-config-printer-1.1.19/monitor.py.empty-nse system-config-printer-1.1.19/monitor.py
--- system-config-printer-1.1.19/monitor.py.empty-nse 2010-05-18 14:59:00.000000000 +0100
+++ system-config-printer-1.1.19/monitor.py 2010-06-28 16:06:46.027009589 +0100
@@ -418,6 +418,12 @@ class Monitor:
continue
# Job events
+ if not nse.startswith ("job-"):
+ # Some versions of CUPS give empty
+ # notify-subscribed-event attributes (STR #3608).
+ debugprint ("Unhandled nse %s" % repr (nse))
+ continue
+
jobid = event['notify-job-id']
if (nse == 'job-created' or
(nse == 'job-state-changed' and
system-config-printer-threading-fixes.patch:
asyncipp.py | 6 ++++++
asyncpk1.py | 4 ++++
gtkinklevel.py | 8 ++++++--
gtkspinner.py | 2 ++
jobviewer.py | 10 +++++++++-
system-config-printer.py | 7 +++++++
timedops.py | 7 +++++--
7 files changed, 39 insertions(+), 5 deletions(-)
--- NEW FILE system-config-printer-threading-fixes.patch ---
diff -up system-config-printer-1.1.19/asyncipp.py.threading-fixes system-config-printer-1.1.19/asyncipp.py
--- system-config-printer-1.1.19/asyncipp.py.threading-fixes 2010-05-18 14:59:00.000000000 +0100
+++ system-config-printer-1.1.19/asyncipp.py 2010-06-28 16:03:00.719885124 +0100
@@ -173,11 +173,13 @@ class _IPPConnectionThread(threading.Thr
def _auth (self, prompt, conn=None, method=None, resource=None):
def prompt_auth (prompt):
+ gtk.gdk.threads_enter ()
if conn == None:
self._auth_handler (prompt, self._conn)
else:
self._auth_handler (prompt, self._conn, method, resource)
+ gtk.gdk.threads_leave ()
return False
if self._auth_handler == None:
@@ -190,7 +192,9 @@ class _IPPConnectionThread(threading.Thr
def _reply (self, result):
def send_reply (handler, result):
if not self._destroyed:
+ gtk.gdk.threads_enter ()
handler (self._conn, result)
+ gtk.gdk.threads_leave ()
return False
if not self._destroyed and self._reply_handler:
@@ -199,7 +203,9 @@ class _IPPConnectionThread(threading.Thr
def _error (self, exc):
def send_error (handler, exc):
if not self._destroyed:
+ gtk.gdk.threads_enter ()
handler (self._conn, exc)
+ gtk.gdk.threads_leave ()
return False
if not self._destroyed and self._error_handler:
diff -up system-config-printer-1.1.19/asyncpk1.py.threading-fixes system-config-printer-1.1.19/asyncpk1.py
--- system-config-printer-1.1.19/asyncpk1.py.threading-fixes 2010-05-18 14:59:00.000000000 +0100
+++ system-config-printer-1.1.19/asyncpk1.py 2010-06-28 16:03:00.720884111 +0100
@@ -105,7 +105,9 @@ class _PK1AsyncMethodCall:
return
if str (error) == '':
+ gtk.gdk.threads_enter ()
self._client_reply_handler (self._conn, self._unpack_fn (*args))
+ gtk.gdk.threads_leave ()
self._destroy ()
return
@@ -118,7 +120,9 @@ class _PK1AsyncMethodCall:
if exc.get_dbus_name () == CUPS_PK_NEED_AUTH:
exc = cups.IPPError (cups.IPP_NOT_AUTHORIZED, 'pkcancel')
+ gtk.gdk.threads_enter ()
self._client_error_handler (self._conn, exc)
+ gtk.gdk.threads_leave ()
self._destroy ()
return
diff -up system-config-printer-1.1.19/gtkinklevel.py.threading-fixes system-config-printer-1.1.19/gtkinklevel.py
--- system-config-printer-1.1.19/gtkinklevel.py.threading-fixes 2010-05-18 14:59:00.000000000 +0100
+++ system-config-printer-1.1.19/gtkinklevel.py 2010-06-28 16:03:00.721884791 +0100
@@ -1,7 +1,8 @@
#!/usr/bin/env python
-## Copyright (C) 2009 Tim Waugh <twaugh at redhat.com>
-## Copyright (C) 2009 Red Hat, Inc.
+## Copyright (C) 2009, 2010 Red Hat, Inc.
+## Authors:
+## Tim Waugh <twaugh at redhat.com>
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -95,11 +96,13 @@ if __name__ == '__main__':
import gobject
import time
def adjust_level (level):
+ gtk.gdk.threads_enter ()
l = level.get_level ()
l += 1
if l > 100:
l = 0
level.set_level (l)
+ gtk.gdk.threads_leave ()
return True
w = gtk.Window ()
@@ -122,4 +125,5 @@ if __name__ == '__main__':
gobject.timeout_add (10, adjust_level, ylevel)
w.show_all ()
w.connect ('delete_event', gtk.main_quit)
+ gtk.gdk.threads_init ()
gtk.main ()
diff -up system-config-printer-1.1.19/gtkspinner.py.threading-fixes system-config-printer-1.1.19/gtkspinner.py
--- system-config-printer-1.1.19/gtkspinner.py.threading-fixes 2010-04-08 10:31:03.000000000 +0100
+++ system-config-printer-1.1.19/gtkspinner.py 2010-06-28 16:03:00.722884381 +0100
@@ -69,7 +69,9 @@ class Spinner:
if n >= self.n_frames:
n = 1
+ gtk.gdk.threads_enter ()
self._set_frame (n)
+ gtk.gdk.threads_leave ()
return True
def start (self, timeout=125):
diff -up system-config-printer-1.1.19/jobviewer.py.threading-fixes system-config-printer-1.1.19/jobviewer.py
--- system-config-printer-1.1.19/jobviewer.py.threading-fixes 2010-05-18 14:59:00.000000000 +0100
+++ system-config-printer-1.1.19/jobviewer.py 2010-06-28 16:03:00.723884394 +0100
@@ -463,7 +463,13 @@ class JobViewer (GtkGUI, monitor.Watcher
self.store.set_value (iter, 1, t)
if need_update and not self.job_creation_times_timer:
- t = gobject.timeout_add_seconds (60, self.update_job_creation_times)
+ def update_times_with_locking ():
+ gtk.gdk.threads_enter ()
+ ret = self.update_job_creation_times ()
+ gtk.gdk.threads_leave ()
+ return ret
+
+ t = gobject.timeout_add_seconds (60, update_times_with_locking)
self.job_creation_times_timer = t
if not need_update:
@@ -509,7 +515,9 @@ class JobViewer (GtkGUI, monitor.Watcher
if not self.job_creation_times_timer:
def start_updating_job_creation_times():
+ gtk.gdk.threads_enter ()
self.update_job_creation_times ()
+ gtk.gdk.threads_leave ()
return False
gobject.timeout_add (500, start_updating_job_creation_times)
diff -up system-config-printer-1.1.19/system-config-printer.py.threading-fixes system-config-printer-1.1.19/system-config-printer.py
--- system-config-printer-1.1.19/system-config-printer.py.threading-fixes 2010-05-18 14:59:00.000000000 +0100
+++ system-config-printer-1.1.19/system-config-printer.py 2010-06-28 16:03:00.742009439 +0100
@@ -3218,7 +3218,9 @@ class GUI(GtkGUI, monitor.Watcher):
# printers changing 'shared' state, so refresh instead of
# update. We have to defer this to prevent signal problems.
def deferred_refresh ():
+ gtk.gdk.threads_enter ()
self.populateList ()
+ gtk.gdk.threads_leave ()
return False
gobject.idle_add (deferred_refresh)
@@ -3537,7 +3539,9 @@ class GUI(GtkGUI, monitor.Watcher):
monitor.Watcher.printer_event (self, mon, printer, eventname, event)
def deferred_refresh ():
+ gtk.gdk.threads_enter ()
self.populateList ()
+ gtk.gdk.threads_leave ()
return False
gtk.gdk.threads_enter ()
@@ -6116,6 +6120,7 @@ class NewPrinterGUI(GtkGUI):
self.printer_finder = finder
def found_network_printer_callback (self, new_device):
+ gtk.gdk.threads_enter ()
if new_device:
self.network_found += 1
dev = PhysicalDevice (new_device)
@@ -6156,6 +6161,8 @@ class NewPrinterGUI(GtkGUI):
"found at that "
"address.") + '</i>')
self.lblNetworkFindNotFound.show ()
+
+ gtk.gdk.threads_leave ()
###
def getDeviceURI(self):
diff -up system-config-printer-1.1.19/timedops.py.threading-fixes system-config-printer-1.1.19/timedops.py
--- system-config-printer-1.1.19/timedops.py.threading-fixes 2010-01-27 11:17:44.000000000 +0000
+++ system-config-printer-1.1.19/timedops.py 2010-06-28 16:03:00.743009369 +0100
@@ -1,7 +1,8 @@
#!/usr/bin/env python
-## Copyright (C) 2008, 2009 Red Hat, Inc.
-## Copyright (C) 2008, 2009 Tim Waugh <twaugh at redhat.com>
+## Copyright (C) 2008, 2009, 2010 Red Hat, Inc.
+## Authors:
+## Tim Waugh <twaugh at redhat.com>
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -94,6 +95,7 @@ class TimedSubprocess(Timed):
return True
def show_wait_window (self):
+ gtk.gdk.threads_enter ()
wait = gtk.MessageDialog (self.parent,
gtk.DIALOG_MODAL |
gtk.DIALOG_DESTROY_WITH_PARENT,
@@ -108,6 +110,7 @@ class TimedSubprocess(Timed):
wait.format_secondary_text (_("Gathering information"))
wait.show_all ()
self.wait_window = wait
+ gtk.gdk.threads_leave ()
return False
def wait_window_response (self, dialog, response):
Index: system-config-printer.spec
===================================================================
RCS file: /cvs/pkgs/rpms/system-config-printer/F-12/system-config-printer.spec,v
retrieving revision 1.372
retrieving revision 1.373
diff -u -p -r1.372 -r1.373
--- system-config-printer.spec 19 May 2010 15:39:48 -0000 1.372
+++ system-config-printer.spec 28 Jun 2010 15:16:41 -0000 1.373
@@ -7,7 +7,7 @@
Summary: A printer administration tool
Name: system-config-printer
Version: 1.1.19
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2+
URL: http://cyberelk.net/tim/software/system-config-printer/
Group: System Environment/Base
@@ -15,6 +15,11 @@ Source0: http://cyberelk.net/tim/data/sy
Source1: http://cyberelk.net/tim/data/pycups/pycups-%{pycups_version}.tar.bz2
Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2
+Patch1: system-config-printer-threading-fixes.patch
+Patch2: system-config-printer-canon-naming.patch
+Patch3: system-config-printer-blacklist-graphtec.patch
+Patch4: system-config-printer-empty-nse.patch
+
Patch101: pycups-stack-overflow.patch
BuildRequires: cups-devel >= 1.2
@@ -75,6 +80,10 @@ printers.
%prep
%setup -q -a 1 -a 2
+%patch1 -p1 -b .threading-fixes
+%patch2 -p1 -b .canon-naming
+%patch3 -p1 -b .blacklist-graphtec
+%patch4 -p1 -b .empty-nse
pushd pycups-%{pycups_version}
%patch101 -p1 -b .stack-overflow
@@ -197,6 +206,12 @@ rm -rf %buildroot
exit 0
%changelog
+* Mon Jun 28 2010 Tim Waugh <twaugh at redhat.com> - 1.1.19-3
+- Threading fixes from upstream.
+- Fixed Canon naming issues.
+- Blacklist Graphtec devices (bug #547171).
+- Handle empty notify-subscribed-event attribute (bug #606909).
+
* Wed May 19 2010 Tim Waugh <twaugh at redhat.com> - 1.1.19-2
- Fixed stack overflow in cups.Connection.deletePrinterOptionDefault
(bug #584991).
More information about the scm-commits
mailing list