- Updated to pycups-1.9.49.
- 1.2.0: - Another error handling fix in check-device-ids.py. - Added StartupNotify=true to 'manage print jobs' desktop file.
This commit is contained in:
parent
12cfc89d34
commit
d8e6b313f2
@ -214,3 +214,5 @@ system-config-printer-1.1.90.tar.xz
|
||||
system-config-printer-1.1.91.tar.xz
|
||||
system-config-printer-1.1.92.tar.xz
|
||||
system-config-printer-1.1.93.tar.xz
|
||||
system-config-printer-1.2.0.tar.xz
|
||||
pycups-1.9.49.tar.bz2
|
||||
|
4
sources
4
sources
@ -1,3 +1,3 @@
|
||||
ac8f98a40b0fc4b6ab4470f10489887a pysmbc-1.0.6.tar.bz2
|
||||
2e9ed692c75328e7fb88f8c230f70990 pycups-1.9.48.tar.bz2
|
||||
454506953f2be06865536953cdba8f05 system-config-printer-1.1.93.tar.xz
|
||||
6db9d8bc7f40315bc0b93f210737cc82 pycups-1.9.49.tar.bz2
|
||||
dc9c0728503c57a846bdf868eb3cf90d system-config-printer-1.2.0.tar.xz
|
||||
|
@ -1,88 +0,0 @@
|
||||
diff -up system-config-printer-1.1.93/check-device-ids.py.check-install system-config-printer-1.1.93/check-device-ids.py
|
||||
--- system-config-printer-1.1.93/check-device-ids.py.check-install 2010-02-27 10:33:00.000000000 +0000
|
||||
+++ system-config-printer-1.1.93/check-device-ids.py 2010-03-01 16:16:01.088735654 +0000
|
||||
@@ -20,6 +20,7 @@
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
+import dbus
|
||||
import cups
|
||||
import cupshelpers
|
||||
from cupshelpers.ppds import PPDs, ppdMakeModelSplit
|
||||
@@ -27,10 +28,6 @@ import sys
|
||||
|
||||
cups.setUser ('root')
|
||||
c = cups.Connection ()
|
||||
-print "Fetching driver list"
|
||||
-ppds = PPDs (c.getPPDs ())
|
||||
-ppds._init_ids ()
|
||||
-makes = ppds.getMakes ()
|
||||
|
||||
devices = None
|
||||
if len (sys.argv) > 1 and sys.argv[1] == '--help':
|
||||
@@ -66,14 +63,56 @@ if len (devices) == 0:
|
||||
sys.exit (0)
|
||||
|
||||
n = 0
|
||||
+device_ids = []
|
||||
for device, attrs in devices.iteritems ():
|
||||
make_and_model = attrs.get ('device-make-and-model')
|
||||
device_id = attrs.get ('device-id')
|
||||
if not (make_and_model and device_id):
|
||||
continue
|
||||
|
||||
+ id_fields = cupshelpers.parseDeviceID (device_id)
|
||||
+ this_id = "MFG:%s;MDL:%s;" % (id_fields['MFG'], id_fields['MDL'])
|
||||
+ device_ids.append (this_id)
|
||||
n += 1
|
||||
|
||||
+if device_ids:
|
||||
+ try:
|
||||
+ bus = dbus.SessionBus ()
|
||||
+
|
||||
+ print "Installing relevant drivers using session service"
|
||||
+ try:
|
||||
+ obj = bus.get_object ("org.freedesktop.PackageKit",
|
||||
+ "/org/freedesktop/PackageKit")
|
||||
+ proxy = dbus.Interface (obj, "org.freedesktop.PackageKit.Modify")
|
||||
+ proxy.InstallPrinterDrivers (0, device_ids,
|
||||
+ "hide-finished", timeout=3600)
|
||||
+ except dbus.exceptions.DBusException, (e, r):
|
||||
+ print "Ignoring exception: %s" % e
|
||||
+ except dbus.exceptions.DBusException:
|
||||
+ try:
|
||||
+ bus = dbus.SystemBus ()
|
||||
+
|
||||
+ print "Installing relevant drivers using system service"
|
||||
+ try:
|
||||
+ obj = bus.get_object ("com.redhat.PrinterDriversInstaller",
|
||||
+ "/com/redhat/PrinterDriversInstaller")
|
||||
+ proxy = dbus.Interface (obj,
|
||||
+ "com.redhat.PrinterDriversInstaller")
|
||||
+ for device_id in device_ids:
|
||||
+ id_dict = cupshelpers.parseDeviceID (device_id)
|
||||
+ proxy.InstallDrivers (id_dict['MFG'], id_dict['MDL'], '',
|
||||
+ timeout=3600)
|
||||
+ except dbus.exceptions.DBusException:
|
||||
+ print "Ignoring exception: %s" % e
|
||||
+ except dbus.exceptions.DBusException:
|
||||
+ print "D-Bus not available so skipping package installation"
|
||||
+
|
||||
+
|
||||
+print "Fetching driver list"
|
||||
+ppds = PPDs (c.getPPDs ())
|
||||
+ppds._init_ids ()
|
||||
+makes = ppds.getMakes ()
|
||||
+
|
||||
i = 1
|
||||
item = unichr (0x251c) + unichr (0x2500) + unichr (0x2500)
|
||||
last = unichr (0x2514) + unichr (0x2500) + unichr (0x2500)
|
||||
@@ -92,7 +131,7 @@ for device, attrs in devices.iteritems (
|
||||
print "%s %s: MFG:%s;MDL:%s;" % (line, make_and_model,
|
||||
id_fields['MFG'],
|
||||
id_fields['MDL'])
|
||||
-
|
||||
+
|
||||
try:
|
||||
drivers = ppds.ids[id_fields['MFG'].lower ()][id_fields['MDL'].lower ()]
|
||||
except KeyError:
|
@ -1,69 +0,0 @@
|
||||
diff -up system-config-printer-1.1.17/pycups-1.9.48/cupsconnection.c.cupsconnection-dealloc system-config-printer-1.1.17/pycups-1.9.48/cupsconnection.c
|
||||
--- system-config-printer-1.1.17/pycups-1.9.48/cupsconnection.c.cupsconnection-dealloc 2010-03-08 17:06:47.000000000 +0100
|
||||
+++ system-config-printer-1.1.17/pycups-1.9.48/cupsconnection.c 2010-03-08 17:06:47.000000000 +0100
|
||||
@@ -231,37 +231,43 @@ Connection_dealloc (Connection *self)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
- if (NumConnections > 1)
|
||||
- {
|
||||
- Connection **new_array = calloc (NumConnections - 1,
|
||||
- sizeof (Connection *));
|
||||
+ for (j = 0; j < NumConnections; j++)
|
||||
+ if (Connections[j] == self)
|
||||
+ break;
|
||||
|
||||
- for (i = 0, j = 0; i < NumConnections; i++)
|
||||
+ if (j < NumConnections)
|
||||
+ {
|
||||
+ if (NumConnections > 1)
|
||||
{
|
||||
- if (Connections[i] == self)
|
||||
+ Connection **new_array = calloc (NumConnections - 1,
|
||||
+ sizeof (Connection *));
|
||||
+
|
||||
+ if (new_array)
|
||||
{
|
||||
- if (!new_array)
|
||||
- Connections[i] = NULL;
|
||||
+ int k;
|
||||
+ for (i = 0, k = 0; i < NumConnections; i++)
|
||||
+ {
|
||||
+ if (i == j)
|
||||
+ continue;
|
||||
|
||||
- continue;
|
||||
- }
|
||||
+ new_array[k++] = Connections[i];
|
||||
+ }
|
||||
|
||||
- if (new_array)
|
||||
- new_array[j++] = Connections[i];
|
||||
+ free (Connections);
|
||||
+ Connections = new_array;
|
||||
+ NumConnections--;
|
||||
+ } else
|
||||
+ /* Failed to allocate memory. Just clear out the reference. */
|
||||
+ Connections[j] = NULL;
|
||||
}
|
||||
-
|
||||
- if (new_array) {
|
||||
+ else
|
||||
+ {
|
||||
+ /* The only element is the one we no longer need. */
|
||||
free (Connections);
|
||||
- Connections = new_array;
|
||||
- NumConnections--;
|
||||
+ Connections = NULL;
|
||||
+ NumConnections = 0;
|
||||
}
|
||||
}
|
||||
- else
|
||||
- {
|
||||
- free (Connections);
|
||||
- Connections = NULL;
|
||||
- NumConnections = 0;
|
||||
- }
|
||||
|
||||
if (self->http) {
|
||||
debugprintf ("httpClose()\n");
|
@ -1,27 +0,0 @@
|
||||
diff -up system-config-printer-1.1.93/system-config-printer.py.icon-name system-config-printer-1.1.93/system-config-printer.py
|
||||
--- system-config-printer-1.1.93/system-config-printer.py.icon-name 2010-02-26 15:15:26.000000000 +0000
|
||||
+++ system-config-printer-1.1.93/system-config-printer.py 2010-03-01 18:53:04.502609395 +0000
|
||||
@@ -1463,19 +1463,19 @@ class GUI(GtkGUI, monitor.Watcher):
|
||||
'i-network-printer'),
|
||||
'local-printer':
|
||||
(_("Printer"),
|
||||
- 'gnome-dev-printer'),
|
||||
+ 'printer'),
|
||||
'local-fax':
|
||||
(_("Fax"),
|
||||
- 'gnome-dev-printer'),
|
||||
+ 'printer'),
|
||||
'local-class':
|
||||
(_("Class"),
|
||||
- 'gnome-dev-printer'),
|
||||
+ 'printer'),
|
||||
'ipp-printer':
|
||||
(_("Network printer"),
|
||||
'i-network-printer'),
|
||||
'smb-printer':
|
||||
(_("Network print share"),
|
||||
- 'gnome-dev-printer'),
|
||||
+ 'printer'),
|
||||
'network-printer':
|
||||
(_("Network printer"),
|
||||
'i-network-printer'),
|
@ -1,21 +0,0 @@
|
||||
diff -up system-config-printer-1.1.93/gtkspinner.py.import-gobject system-config-printer-1.1.93/gtkspinner.py
|
||||
--- system-config-printer-1.1.93/gtkspinner.py.import-gobject 2009-12-03 17:06:22.000000000 +0000
|
||||
+++ system-config-printer-1.1.93/gtkspinner.py 2010-02-28 09:24:55.338693167 +0000
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
## system-config-printer
|
||||
|
||||
-## Copyright (C) 2009 Tim Waugh <twaugh@redhat.com>
|
||||
+## Copyright (C) 2009, 2010 Red Hat, Inc
|
||||
+## Author: Tim Waugh <twaugh@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,6 +20,7 @@
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
import glib
|
||||
+import gobject
|
||||
import gtk
|
||||
|
||||
class Spinner:
|
@ -1,34 +0,0 @@
|
||||
diff -up system-config-printer-1.1.18/AdvancedServerSettings.py.missing-imports system-config-printer-1.1.18/AdvancedServerSettings.py
|
||||
--- system-config-printer-1.1.18/AdvancedServerSettings.py.missing-imports 2010-03-10 09:33:45.000000000 +0000
|
||||
+++ system-config-printer-1.1.18/AdvancedServerSettings.py 2010-03-16 17:30:11.388600957 +0000
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
## system-config-printer
|
||||
|
||||
-## Copyright (C) 2008, 2009 Red Hat, Inc.
|
||||
-## Copyright (C) 2008, 2009 Tim Waugh <twaugh@redhat.com>
|
||||
+## Copyright (C) 2008, 2009, 2010 Red Hat, Inc.
|
||||
+## Authors:
|
||||
+## Tim Waugh <twaugh@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
|
||||
@@ -20,6 +21,7 @@
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
from gettext import gettext as _
|
||||
+import cups
|
||||
import gobject
|
||||
import gtk
|
||||
import os
|
||||
diff -up system-config-printer-1.1.18/jobviewer.py.missing-imports system-config-printer-1.1.18/jobviewer.py
|
||||
--- system-config-printer-1.1.18/jobviewer.py.missing-imports 2010-03-10 09:33:45.000000000 +0000
|
||||
+++ system-config-printer-1.1.18/jobviewer.py 2010-03-16 17:30:11.398601208 +0000
|
||||
@@ -23,6 +23,7 @@ import dbus.glib
|
||||
import dbus.service
|
||||
import pynotify
|
||||
import gettext
|
||||
+import glib
|
||||
import gobject
|
||||
import gtk
|
||||
import gtk.gdk
|
@ -1,7 +1,7 @@
|
||||
diff -up system-config-printer-1.1.16/Makefile.am.no-epydoc system-config-printer-1.1.16/Makefile.am
|
||||
--- system-config-printer-1.1.16/Makefile.am.no-epydoc 2009-12-22 14:44:19.000000000 +0000
|
||||
+++ system-config-printer-1.1.16/Makefile.am 2010-01-19 12:50:09.018955351 +0000
|
||||
@@ -256,7 +256,9 @@ $(man_MANS): $(top_srcdir)/man/system-co
|
||||
diff -up system-config-printer-1.2.0/Makefile.am.no-epydoc system-config-printer-1.2.0/Makefile.am
|
||||
--- system-config-printer-1.2.0/Makefile.am.no-epydoc 2010-03-16 18:22:08.000000000 +0000
|
||||
+++ system-config-printer-1.2.0/Makefile.am 2010-03-17 14:37:37.977366218 +0000
|
||||
@@ -247,7 +247,9 @@ $(man_MANS): $(top_srcdir)/man/system-co
|
||||
|
||||
html: $(EXPORT_MODULES)
|
||||
rm -rf html
|
||||
@ -10,12 +10,12 @@ diff -up system-config-printer-1.1.16/Makefile.am.no-epydoc system-config-printe
|
||||
+ pydoc -w $(EXPORT_MODULES)
|
||||
+ mv $(patsubst %,%.html,$(EXPORT_MODULES)) html
|
||||
|
||||
distcheck-hook: update-po
|
||||
distcheck-hook: update-po missing-imports
|
||||
|
||||
diff -up system-config-printer-1.1.16/Makefile.in.no-epydoc system-config-printer-1.1.16/Makefile.in
|
||||
--- system-config-printer-1.1.16/Makefile.in.no-epydoc 2009-12-22 14:44:34.000000000 +0000
|
||||
+++ system-config-printer-1.1.16/Makefile.in 2010-01-19 12:50:09.020955776 +0000
|
||||
@@ -1440,7 +1440,9 @@ $(man_MANS): $(top_srcdir)/man/system-co
|
||||
diff -up system-config-printer-1.2.0/Makefile.in.no-epydoc system-config-printer-1.2.0/Makefile.in
|
||||
--- system-config-printer-1.2.0/Makefile.in.no-epydoc 2010-03-17 14:29:52.000000000 +0000
|
||||
+++ system-config-printer-1.2.0/Makefile.in 2010-03-17 14:37:19.098486129 +0000
|
||||
@@ -1430,7 +1430,9 @@ $(man_MANS): $(top_srcdir)/man/system-co
|
||||
|
||||
html: $(EXPORT_MODULES)
|
||||
rm -rf html
|
||||
@ -24,11 +24,11 @@ diff -up system-config-printer-1.1.16/Makefile.in.no-epydoc system-config-printe
|
||||
+ pydoc -w $(EXPORT_MODULES)
|
||||
+ mv $(patsubst %,%.html,$(EXPORT_MODULES)) html
|
||||
|
||||
distcheck-hook: update-po
|
||||
distcheck-hook: update-po missing-imports
|
||||
|
||||
diff -up system-config-printer-1.1.16/pycups-1.9.48/Makefile.no-epydoc system-config-printer-1.1.16/pycups-1.9.48/Makefile
|
||||
--- system-config-printer-1.1.16/pycups-1.9.48/Makefile.no-epydoc 2010-01-19 12:34:47.000000000 +0000
|
||||
+++ system-config-printer-1.1.16/pycups-1.9.48/Makefile 2010-01-19 12:50:30.098955294 +0000
|
||||
diff -up system-config-printer-1.2.0/pycups-1.9.49/Makefile.no-epydoc system-config-printer-1.2.0/pycups-1.9.48/Makefile
|
||||
--- system-config-printer-1.2.0/pycups-1.9.49/Makefile.no-epydoc 2010-01-19 12:34:47.000000000 +0000
|
||||
+++ system-config-printer-1.2.0/pycups-1.9.49/Makefile 2010-03-17 14:36:52.248486676 +0000
|
||||
@@ -14,7 +14,9 @@ cups.so: $(SOURCES)
|
||||
|
||||
doc: cups.so
|
||||
@ -40,9 +40,9 @@ diff -up system-config-printer-1.1.16/pycups-1.9.48/Makefile.no-epydoc system-co
|
||||
|
||||
clean:
|
||||
-rm -rf build cups.so *.pyc *~
|
||||
diff -up system-config-printer-1.1.16/pysmbc-1.0.6/Makefile.no-epydoc system-config-printer-1.1.16/pysmbc-1.0.6/Makefile
|
||||
--- system-config-printer-1.1.16/pysmbc-1.0.6/Makefile.no-epydoc 2008-10-20 15:51:14.000000000 +0100
|
||||
+++ system-config-printer-1.1.16/pysmbc-1.0.6/Makefile 2010-01-19 12:50:30.100081172 +0000
|
||||
diff -up system-config-printer-1.2.0/pysmbc-1.0.6/Makefile.no-epydoc system-config-printer-1.2.0/pysmbc-1.0.6/Makefile
|
||||
--- system-config-printer-1.2.0/pysmbc-1.0.6/Makefile.no-epydoc 2008-10-20 15:51:14.000000000 +0100
|
||||
+++ system-config-printer-1.2.0/pysmbc-1.0.6/Makefile 2010-03-17 14:36:52.251484687 +0000
|
||||
@@ -12,7 +12,9 @@ smbc.so: $(SOURCES)
|
||||
|
||||
doc: smbc.so
|
||||
|
@ -1,4 +1,4 @@
|
||||
%global pycups_version 1.9.48
|
||||
%global pycups_version 1.9.49
|
||||
%global pysmbc_version 1.0.6
|
||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||
@ -6,8 +6,8 @@
|
||||
|
||||
Summary: A printer administration tool
|
||||
Name: system-config-printer
|
||||
Version: 1.1.93
|
||||
Release: 7%{?dist}
|
||||
Version: 1.2.0
|
||||
Release: 1%{?dist}
|
||||
License: GPLv2+
|
||||
URL: http://cyberelk.net/tim/software/system-config-printer/
|
||||
Group: System Environment/Base
|
||||
@ -19,11 +19,6 @@ Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2
|
||||
|
||||
Patch1: system-config-printer-no-epydoc.patch
|
||||
Patch2: system-config-printer-lowercase-mfg-mdl.patch
|
||||
Patch3: system-config-printer-import-gobject.patch
|
||||
Patch4: system-config-printer-check-install.patch
|
||||
Patch5: system-config-printer-icon-name.patch
|
||||
Patch6: system-config-printer-cupsconnection-dealloc.patch
|
||||
Patch7: system-config-printer-missing-imports.patch
|
||||
|
||||
BuildRequires: cups-devel >= 1.2
|
||||
BuildRequires: python-devel >= 2.4
|
||||
@ -88,23 +83,8 @@ printers.
|
||||
# Convert InstallPrinterDriver requests to lower-case.
|
||||
%patch2 -p1 -b .lowercase-mfg-mdl
|
||||
|
||||
# Import gobject in gtkspinner.
|
||||
%patch3 -p1 -b .import-gobject
|
||||
|
||||
# Attempt to install relevant driver packages in Device IDs checker.
|
||||
%patch4 -p1 -b .check-install
|
||||
|
||||
# Use 'printer' icon name instead of 'gnome-dev-printer'.
|
||||
%patch5 -p1 -b .icon-name
|
||||
|
||||
# Fix pycups Connection_dealloc()
|
||||
%patch6 -p1 -b .cupsconnection-dealloc
|
||||
|
||||
# Import modules we catch exceptions from (bug #574117).
|
||||
%patch7 -p1 -b .missing-imports
|
||||
|
||||
%build
|
||||
%configure --with-udev-rules --with-polkit-1
|
||||
%configure --with-udev-rules
|
||||
|
||||
pushd pycups-%{pycups_version}
|
||||
make
|
||||
@ -218,6 +198,12 @@ rm -rf %buildroot
|
||||
exit 0
|
||||
|
||||
%changelog
|
||||
* Wed Mar 17 2010 Tim Waugh <twaugh@redhat.com> - 1.2.0-1
|
||||
- Updated to pycups-1.9.49.
|
||||
- 1.2.0:
|
||||
- Another error handling fix in check-device-ids.py.
|
||||
- Added StartupNotify=true to 'manage print jobs' desktop file.
|
||||
|
||||
* Tue Mar 16 2010 Tim Waugh <twaugh@redhat.com> - 1.1.93-7
|
||||
- Import modules we catch exceptions from (bug #574117).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user