rpms/system-config-printer/F-11 system-config-printer-gutenprint.patch, NONE, 1.1 system-config-printer-packagekit.patch, NONE, 1.1 system-config-printer-stopped-jobs.patch, NONE, 1.1 system-config-printer.spec, 1.266, 1.267

Tim Waugh twaugh at fedoraproject.org
Fri Jul 3 17:14:57 UTC 2009


Author: twaugh

Update of /cvs/pkgs/rpms/system-config-printer/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7208

Modified Files:
	system-config-printer.spec 
Added Files:
	system-config-printer-gutenprint.patch 
	system-config-printer-packagekit.patch 
	system-config-printer-stopped-jobs.patch 
Log Message:
* Fri Jul  3 2009 Tim Waugh <twaugh at redhat.com> 1.1.8-4
- Use gpk-install-package-name instead of trying to use the D-Bus API.
- Spot stopped jobs with CUPS 1.4 as well (trac #177).  This, along
  with the previous fix, addresses bug #509177.
- Map gutenprint filenames to the package name.


system-config-printer-gutenprint.patch:

--- NEW FILE system-config-printer-gutenprint.patch ---
diff -up system-config-printer-1.1.8/cupshelpers/cupshelpers.py.gutenprint system-config-printer-1.1.8/cupshelpers/cupshelpers.py
--- system-config-printer-1.1.8/cupshelpers/cupshelpers.py.gutenprint	2009-06-17 18:39:51.000000000 +0100
+++ system-config-printer-1.1.8/cupshelpers/cupshelpers.py	2009-07-03 18:09:03.598995561 +0100
@@ -736,8 +736,10 @@ def missingPackagesAndExecutables(ppd):
             # IJS servers (used by foomatic)
             'hpijs': 'hpijs',
             'ijsgutenprint.5.0': 'gutenprint',
+            'ijsgutenprint.5.2': 'gutenprint',
             # CUPS filters
             'rastertogutenprint.5.0': 'gutenprint-cups',
+            'rastertogutenprint.5.2': 'gutenprint-cups',
             'commandtoepson': 'gutenprint-cups',
             'commandtocanon': 'gutenprint-cups',
             }

system-config-printer-packagekit.patch:

--- NEW FILE system-config-printer-packagekit.patch ---
diff -up system-config-printer-1.1.8/installpackage.py.packagekit system-config-printer-1.1.8/installpackage.py
--- system-config-printer-1.1.8/installpackage.py.packagekit	2009-05-12 10:36:36.000000000 +0100
+++ system-config-printer-1.1.8/installpackage.py	2009-07-03 18:07:09.560995667 +0100
@@ -2,8 +2,8 @@
 
 ## system-config-printer
 
-## Copyright (C) 2008 Red Hat, Inc.
-## Copyright (C) 2008 Tim Waugh <twaugh at redhat.com>
+## Copyright (C) 2008, 2009 Red Hat, Inc.
+## Copyright (C) 2008, 2009 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
@@ -19,53 +19,18 @@
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-import dbus
-import xml.etree.ElementTree
-from dbus.mainloop.glib import DBusGMainLoop
-DBusGMainLoop (set_as_default=True)
+import os
+import glib
 
 class PackageKit:
     def __init__ (self):
-        bus = dbus.SessionBus ()
-        obj = bus.get_object ("org.freedesktop.PackageKit",
-                              "/org/freedesktop/PackageKit")
-
-        # Find out which API is required.
-        num_args = -1
-        introsp = dbus.Interface (obj, "org.freedesktop.DBus.Introspectable")
-        api = introsp.Introspect ()
-        top = xml.etree.ElementTree.XML (api)
-        for interface in top.findall ("interface"):
-            if interface.attrib.get ("name") != "org.freedesktop.PackageKit":
-                continue
-
-            for method in interface.findall ("method"):
-                if method.attrib.get ("name") != "InstallPackageName":
-                    continue
+        for dir in os.environ.get ("PATH", "").split (":"):
+            path = dir + os.path.sep + "gpk-install-package-name"
+            if os.access (path, os.X_OK):
+                self.gpk_install_package_name = path
+                return
 
-                num_args = len (method.findall ("arg"))
-                break
-
-        if num_args == -1:
-            raise RuntimeError, "Introspection failed for PackageKit"
-
-        self.proxy = dbus.Interface (obj, "org.freedesktop.PackageKit")
-        self.num_args = num_args
+        raise RuntimeError, "No gpk-install-package-name program available"
 
     def InstallPackageName (self, xid, timestamp, name):
-        proxy = self.proxy
-        if self.num_args == 3:
-            return proxy.InstallPackageName (xid, timestamp, name,
-                                             reply_handler=self.reply_handler,
-                                             error_handler=self.error_handler)
-        else:
-            # Old PackageKit interface
-            return proxy.InstallPackageName (name,
-                                             reply_handler=self.reply_handler,
-                                             error_handler=self.error_handler)
-
-    def reply_handler (self, *args):
-        pass
-
-    def error_handler (self, *args):
-        pass
+        glib.spawn_async ([self.gpk_install_package_name, name])

system-config-printer-stopped-jobs.patch:

--- NEW FILE system-config-printer-stopped-jobs.patch ---
diff -up system-config-printer-1.1.8/jobviewer.py.stopped-jobs system-config-printer-1.1.8/jobviewer.py
--- system-config-printer-1.1.8/jobviewer.py.stopped-jobs	2009-06-17 18:39:51.000000000 +0100
+++ system-config-printer-1.1.8/jobviewer.py	2009-07-03 18:08:28.040995881 +0100
@@ -1375,7 +1375,10 @@ class JobViewer (GtkGUI, monitor.Watcher
                 self.notify_completed_job (jobid)
 
         # Look out for stopped jobs.
-        if (self.trayicon and eventname == 'job-stopped' and
+        if (self.trayicon and
+            (eventname == 'job-stopped' or
+             (eventname == 'job-state-changed' and
+              event['job-state'] == cups.IPP_JOB_STOPPED))and
             not jobid in self.stopped_job_prompts):
             # Why has the job stopped?  It might be due to a job error
             # of some sort, or it might be that the backend requires


Index: system-config-printer.spec
===================================================================
RCS file: /cvs/pkgs/rpms/system-config-printer/F-11/system-config-printer.spec,v
retrieving revision 1.266
retrieving revision 1.267
diff -u -p -r1.266 -r1.267
--- system-config-printer.spec	25 Jun 2009 17:02:14 -0000	1.266
+++ system-config-printer.spec	3 Jul 2009 17:14:56 -0000	1.267
@@ -7,7 +7,7 @@
 Summary: A printer administration tool
 Name: system-config-printer
 Version: 1.1.8
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: GPLv2+
 URL: http://cyberelk.net/tim/software/system-config-printer/
 Group: System Environment/Base
@@ -21,6 +21,9 @@ Patch4: system-config-printer-remote-loc
 Patch5: system-config-printer-nmblookup-failure.patch
 Patch6: system-config-printer-properties-cancel.patch
 Patch7: system-config-printer-incorrect-auth.patch
+Patch8: system-config-printer-packagekit.patch
+Patch9: system-config-printer-stopped-jobs.patch
+Patch10: system-config-printer-gutenprint.patch
 
 BuildRequires: cups-devel >= 1.2
 BuildRequires: python-devel >= 2.4
@@ -77,6 +80,9 @@ the configuration tool.
 %patch5 -p1 -b .nmblookup-failure
 %patch6 -p1 -b .properties-cancel
 %patch7 -p1 -b .incorrect-auth
+%patch8 -p1 -b .packagekit
+%patch9 -p1 -b .stopped-jobs
+%patch10 -p1 -b .gutenprint
 
 %build
 %configure
@@ -179,6 +185,12 @@ rm -rf %buildroot
 exit 0
 
 %changelog
+* Fri Jul  3 2009 Tim Waugh <twaugh at redhat.com> 1.1.8-4
+- Use gpk-install-package-name instead of trying to use the D-Bus API.
+- Spot stopped jobs with CUPS 1.4 as well (trac #177).  This, along
+  with the previous fix, addresses bug #509177.
+- Map gutenprint filenames to the package name.
+
 * Thu Jun 25 2009 Tim Waugh <twaugh at redhat.com> 1.1.8-3
 - Use correct 'location' field for printers added remotely.
 - Parse nmblookup failures correctly in troubleshooter.




More information about the fedora-extras-commits mailing list