rpms/system-config-printer/devel system-config-printer-git-1.1.x.patch, 1.7, 1.8 system-config-printer.spec, 1.253, 1.254
Tim Waugh
twaugh at fedoraproject.org
Tue Mar 10 18:32:15 UTC 2009
- Previous message (by thread): rpms/xastir/devel xastir-1.9.4-engunits.patch, 1.3, 1.4 xastir-1.9.4-libdir.patch, 1.4, 1.5 .cvsignore, 1.4, 1.5 sources, 1.4, 1.5 xastir.spec, 1.17, 1.18
- Next message (by thread): [pkgdb] leonidas-backgrounds had acl change status
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: twaugh
Update of /cvs/pkgs/rpms/system-config-printer/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26407
Modified Files:
system-config-printer.spec
Added Files:
system-config-printer-git-1.1.x.patch
Log Message:
* Tue Mar 10 2009 Tim Waugh <twaugh at redhat.com> 1.1.5-2
- Added patch for changes in 1.1.x since 1.1.5:
- Strip " hpijs" from PPD names.
- Handle there being no operation name set when authentication/retry
is required.
- Mark "Unauthorized" PolicyKit dialog strings for translation, and
change that dialog to an error.
- Work around marker-* attributes not being presented as lists
(bug #489512).
- D-Bus policy tweak.
- Better PPD fallback searching.
- Fixed model search oddity when no digits in model name.
- Fixed locale save/restore in cupshelpers (bug #489313).
- Use gtk.show_uri() instead of gnome.url_show() (trac #147).
- Removed HPLIP probe screen (no longer needed).
- Be certain of having the right cell when starting a rename
(Ubuntu #333260).
- Fixed strftime call (Ubuntu #334859).
- Check dict before use when handling auth-info-required.
- Handle timed operations being cancelled in the troubleshooter test
print page (Ubuntu #325084).
- Put pycups version requirement in monitor module.
system-config-printer-git-1.1.x.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.7 -r 1.8 system-config-printer-git-1.1.x.patch
Index: system-config-printer-git-1.1.x.patch
===================================================================
RCS file: system-config-printer-git-1.1.x.patch
diff -N system-config-printer-git-1.1.x.patch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ system-config-printer-git-1.1.x.patch 10 Mar 2009 18:32:12 -0000 1.8
@@ -0,0 +1,108750 @@
+diff -up system-config-printer-1.1.5/authconn.py.git-1.1.x system-config-printer-1.1.5/authconn.py
+--- system-config-printer-1.1.5/authconn.py.git-1.1.x 2009-03-03 13:29:34.000000000 +0000
++++ system-config-printer-1.1.5/authconn.py 2009-03-10 17:43:31.000000000 +0000
+@@ -205,9 +205,10 @@ class Connection:
+ break
+ except cups.IPPError, (e, m):
+ if self._use_pk and m == 'pkcancel':
+- title = 'Unauthorized request (%s)' % fname
+- text = 'You are not authorized for the requested action'
+- show_info_dialog (title, text, None)
++ title = _('Unauthorized request (%s)') % fname
++ text = _("You are not authorized to carry out the"
++ "requested action.")
++ show_error_dialog (title, text, None)
+ raise cups.IPPError (0, _("Operation canceled"))
+ if not self._cancel and (e == cups.IPP_NOT_AUTHORIZED or
+ e == cups.IPP_FORBIDDEN):
+@@ -245,13 +246,18 @@ class Connection:
+ if self._lock:
+ gtk.gdk.threads_enter ()
+
++ try:
++ msg = _("CUPS server error (%s)") % self._operation_stack[0]
++ except IndexError:
++ msg = _("CUPS server error")
++
+ d = gtk.MessageDialog (self._parent,
+ gtk.DIALOG_MODAL |
+ gtk.DIALOG_DESTROY_WITH_PARENT,
+ gtk.MESSAGE_ERROR,
+ gtk.BUTTONS_NONE,
+- _("CUPS server error (%s)") %
+- self._operation_stack[0])
++ msg)
++
+ d.format_secondary_text (_("There was an error during the "
+ "CUPS operation: '%s'." % message))
+ d.add_buttons (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
+@@ -397,8 +403,12 @@ class Connection:
+
+ # Prompt.
+ if len (self._operation_stack) > 0:
+- d = AuthDialog (title=_("Authentication (%s)") %
+- self._operation_stack[0],
++ try:
++ title = _("Authentication (%s)") % self._operation_stack[0]
++ except IndexError:
++ title = _("Authentication")
++
++ d = AuthDialog (title=title,
+ parent=self._parent)
+ else:
+ d = AuthDialog (parent=self._parent)
+diff -U0 system-config-printer-1.1.5/ChangeLog.git-1.1.x system-config-printer-1.1.5/ChangeLog
+--- system-config-printer-1.1.5/ChangeLog.git-1.1.x 2009-03-03 13:29:34.000000000 +0000
++++ system-config-printer-1.1.5/ChangeLog 2009-03-10 17:43:31.000000000 +0000
+@@ -0,0 +1,27 @@
++2009-03-10 Tim Waugh <twaugh at redhat.com>
++
++ * cupshelpers/ppds.py (ppdMakeModelSplit): Strip " hpijs" from PPD
++ names.
++ (ppdMakeModelSplit.strip_suffix): Removed dead code.
++
++2009-03-10 Tim Waugh <twaugh at redhat.com>
++
++ * cupshelpers/ppds.py (PPDs.getPPDNameFromDeviceID): Better PPD
++ fallback searching.
++
++2009-03-10 Till Kamppeter <till.kamppeter at gmail.com>
++
++ * newprinternotification.conf: Adapted D-Bus policy file to the
++ new D-Bus defaults (Ubuntu #318776).
++
++2009-03-10 Tim Waugh <twaugh at redhat.com>
++
++ * cupshelpers/ppds.py (PPDs._findBestMatchPPDs): Don't try search
++ for a model series if there are no digits in the model name.
++
++2009-03-09 Tim Waugh <twaugh at redhat.com>
++
++ * cupshelpers/cupshelpers.py (Printer._expand_flags): Use
++ setlocale() to save current LC_CTYPE value, not getlocale() (bug
++ #489313).
++
+diff -up system-config-printer-1.1.5/cupshelpers/cupshelpers.py.git-1.1.x system-config-printer-1.1.5/cupshelpers/cupshelpers.py
+--- system-config-printer-1.1.5/cupshelpers/cupshelpers.py.git-1.1.x 2009-03-03 13:29:34.000000000 +0000
++++ system-config-printer-1.1.5/cupshelpers/cupshelpers.py 2009-03-10 17:43:31.000000000 +0000
+@@ -52,7 +52,7 @@ class Printer:
+ prefix_length = len(prefix)
+
+ # Use the C locale for lower() (trac #151).
+- current_ctype = locale.getlocale (locale.LC_CTYPE)
++ current_ctype = locale.setlocale (locale.LC_CTYPE)
+ locale.setlocale (locale.LC_CTYPE, "C")
+
+ # loop over cups constants
+diff -up system-config-printer-1.1.5/cupshelpers/ppds.py.git-1.1.x system-config-printer-1.1.5/cupshelpers/ppds.py
+--- system-config-printer-1.1.5/cupshelpers/ppds.py.git-1.1.x 2009-02-10 18:33:35.000000000 +0000
++++ system-config-printer-1.1.5/cupshelpers/ppds.py 2009-03-10 17:43:31.000000000 +0000
+@@ -2,9 +2,9 @@
+
+ ## system-config-printer
+
+-## Copyright (C) 2006, 2007, 2008 Red Hat, Inc.
++## Copyright (C) 2006, 2007, 2008, 2009 Red Hat, Inc.
+ ## Copyright (C) 2006 Florian Festi <ffesti at redhat.com>
+-## Copyright (C) 2006, 2007, 2008 Tim Waugh <twaugh at redhat.com>
++## Copyright (C) 2006, 2007, 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
+@@ -99,11 +99,6 @@ def ppdMakeModelSplit (ppd_make_and_mode
+ make = ppd_make_and_model
+ model = ''
+
+- def strip_suffix (model, suffix):
+- if model.endswith (suffix):
+- return model[:-len(suffix)]
+- return model
+-
+ # Model names do not contain a comma, truncate all from the
+ # comma on
+ c = model.find (",")
+@@ -154,6 +149,7 @@ def ppdMakeModelSplit (ppd_make_and_mode
+ model = re.sub (r"(?i)\s*PostScript\s*$", "", model)
+ model = re.sub (r"(?i)\s*\(\s*\)", "", model)
+ model = re.sub (r"(?i)\s*[\-\/]\s*$", "", model)
++ model = re.sub (r"(?i)\s*hpijs\s*$", "", model)
+
+ for mfr in [ "Apple", "Canon", "Epson", "Lexmark", "Oki" ]:
+ if make == mfr.upper ():
+@@ -550,27 +546,27 @@ class PPDs:
+ ppdnamelist = generic
+
+ if not ppdnamelist:
+- _debugprint ("Text-only fallback")
+ status = self.STATUS_NO_DRIVER
+- ppdnamelist = ["textonly.ppd"]
+- tppdfound = 0
+- for ppdpath in self.ppds.keys ():
+- if ppdpath.endswith (ppdnamelist[0]):
+- tppdfound = 1
+- ppdnamelist = [ppdpath]
+- break
+- if tppdfound == 0:
+- _debugprint ("No text-only driver?! Using postscript.ppd")
+- ppdnamelist = ["postscript.ppd"]
+- psppdfound = 0
++ fallbacks = ["textonly.ppd", "postscript.ppd"]
++ found = False
++ for fallback in fallbacks:
++ _debugprint ("'%s' fallback" % fallback)
++ fallbackgz = fallback + ".gz"
+ for ppdpath in self.ppds.keys ():
+- if ppdpath.endswith (ppdnamelist[0]):
+- psppdfound = 1
++ if (ppdpath.endswith (fallback) or
++ ppdpath.endswith (fallbackgz)):
+ ppdnamelist = [ppdpath]
++ found = True
+ break
+- if psppdfound == 0:
+- _debugprint ("No postscript.ppd; choosing any")
+- ppdnamelist = [self.ppds.keys ()[0]]
++
++ if found:
++ break
++
++ _debugprint ("Fallback '%s' not available" % fallback)
++
++ if not found:
++ _debugprint ("No fallback available; choosing any")
++ ppdnamelist = [self.ppds.keys ()[0]]
+
+ if id_matched:
+ _debugprint ("Checking DES field")
+@@ -700,39 +696,39 @@ class PPDs:
+ modelnumber = 0
+ if digits > 0:
+ modelnumber = int (modelid[digits_start:digits_end])
+- modelpattern = (modelid[:digits_start] + "%d" +
+- modelid[digits_end:])
+- _debugprint ("Searching for model ID '%s', '%s' %% %d" %
+- (modelid, modelpattern, modelnumber))
+- ignore_digits = 0
+- best_mdl = None
+- found = False
+- while ignore_digits < digits:
+- div = pow (10, ignore_digits)
+- modelid = modelpattern % ((modelnumber / div) * div)
+- _debugprint ("Ignoring %d of %d digits, trying %s" %
+- (ignore_digits, digits, modelid))
+-
[...108357 lines suppressed...]
+- # found a locally-connected device.
+- hp = cupshelpers.Device ("hp",
+- **{'device-class': 'network',
+- 'device-info':
+- _("HP Printer (HPLIP)")})
+- devices.append (hp)
+- break
+- else:
+- # The hp backend is in the device list but as a
+- # generic driver with no devices found. It
+- # reports "direct" as its class in this case, but
+- # ought to report "network".
+- each.device_class = 'network'
+-
+ # Mark duplicate URIs for deletion
+ for i in range (len (devices) - 1):
+ for j in range (i + 1, len (devices)):
+@@ -4869,7 +4864,7 @@ class NewPrinterGUI(GtkGUI):
+ device1.uri = "delete"
+ else:
+ device2.uri = "delete"
+- devices = filter(lambda x: x.uri not in ("hpfax",
++ devices = filter(lambda x: x.uri not in ("hp", "hpfax",
+ "hal", "beh",
+ "scsi", "http", "delete"),
+ devices)
+@@ -5617,9 +5612,6 @@ class NewPrinterGUI(GtkGUI):
+ self.device = device
+ self.lblNPDeviceDescription.set_text ('')
+ page = self.new_printer_device_tabs.get(device.type, 1)
+- if device.type == "hp" and device.uri != "hp":
+- page = 0
+-
+ self.ntbkNPType.set_current_page(page)
+
+ location = ''
+@@ -5740,8 +5732,6 @@ class NewPrinterGUI(GtkGUI):
+ self.entSMBPassword.set_text ('')
+ self.entSMBURI.set_text(device.uri[6:])
+ self.btnSMBVerify.set_sensitive(True)
+- elif device.uri == "hp":
+- self.lblHPURI.set_text ('')
+ else:
+ self.entNPTDevice.set_text(device.uri)
+
+@@ -5783,46 +5773,6 @@ class NewPrinterGUI(GtkGUI):
+ if printers:
+ self.cmbentNPTLpdQueue.set_active(0)
+
+- def on_entNPTHPHostname_changed(self, ent):
+- self.lblHPURI.set_text ('')
+- s = ent.get_text ()
+- self.btnHPFindQueue.set_sensitive (len (s) > 0)
+- self.setNPButtons ()
+-
+- def on_btnHPFindQueue_clicked(self, button):
+- host = self.entNPTHPHostname.get_text ()
+-
+- # Check whether the device is supported by HPLIP
+- hplipuri = self.get_hplip_uri_for_network_printer(host, "print")
+- if hplipuri == None or hplipuri == '':
+- show_error_dialog (_("No Print Shares"),
+- _("HPLIP cannot find the device."),
+- self.NewPrinterWindow)
+- self.entNPTHPHostname.grab_focus ()
+- return
+-
+- self.lblHPURI.set_text (hplipuri)
+- s = hplipuri.find ("/usb/")
+- if s == -1:
+- s = hplipuri.find ("/par/")
+-
+- if s == -1:
+- s = hplipuri.find ("/net/")
+-
+- if s != -1:
+- s += 5
+- e = hplipuri[s:].find ("?")
+- if e == -1:
+- e = len (hplipuri)
+-
+- mdl = hplipuri[s:s+e].replace ("_", " ")
+- if mdl.startswith ("hp ") or mdl.startswith ("HP "):
+- mdl = mdl[3:]
+- self.device.make_and_model = "HP " + mdl
+- id = "MFG:HP;MDL:%s;DES:HP %s;" % (mdl, mdl)
+- self.device.id = id
+- self.device.id_dict = cupshelpers.parseDeviceID (id)
+-
+ ### Find Network Printer
+ def on_entNPTNetworkHostname_changed(self, ent):
+ s = ent.get_text ()
+@@ -5938,8 +5888,6 @@ class NewPrinterGUI(GtkGUI):
+ uri = SMBURI (group=group, host=host, share=share,
+ user=user, password=password).get_uri ()
+ device = "smb://" + uri
+- elif self.device.uri == "hp":
+- device = self.lblHPURI.get_text ()
+ elif not self.device.is_class:
+ device = self.device.uri
+ else:
+diff -up system-config-printer-1.1.5/troubleshoot/PrintTestPage.py.git-1.1.x system-config-printer-1.1.5/troubleshoot/PrintTestPage.py
+--- system-config-printer-1.1.5/troubleshoot/PrintTestPage.py.git-1.1.x 2009-03-03 13:29:34.000000000 +0000
++++ system-config-printer-1.1.5/troubleshoot/PrintTestPage.py 2009-03-10 17:43:43.000000000 +0000
+@@ -27,7 +27,7 @@ import os
+ import pango
+ import tempfile
+ import time
+-from timedops import TimedOperation
++from timedops import TimedOperation, OperationCanceled
+
+ from base import *
+
+@@ -166,7 +166,10 @@ class PrintTestPage(Question):
+ return (jobs_dict, completed_jobs_dict)
+
+ self.op = TimedOperation (get_jobs, parent=parent)
+- (jobs_dict, completed_jobs_dict) = self.op.run ()
++ try:
++ (jobs_dict, completed_jobs_dict) = self.op.run ()
++ except OperationCanceled:
++ return False
+
+ # We want to display the jobs in the queue for this printer...
+ try:
+@@ -219,7 +222,10 @@ class PrintTestPage(Question):
+
+ parent = self.troubleshooter.get_window ()
+ self.op = TimedOperation (create_subscription, parent=parent)
+- self.sub_id = self.op.run ()
++ try:
++ self.sub_id = self.op.run ()
++ except OperationCanceled:
++ pass
+
+ try:
+ bus = dbus.SystemBus ()
+@@ -252,7 +258,11 @@ class PrintTestPage(Question):
+ self.op = TimedOperation (cancel_subscription,
+ (self.sub_id,),
+ parent=parent)
+- self.op.run ()
++ try:
++ self.op.run ()
++ except OperationCanceled:
++ pass
++
+ try:
+ del self.sub_seq
+ except:
+@@ -302,8 +312,12 @@ class PrintTestPage(Question):
+ self.op = TimedOperation (collect_attributes,
+ (jobs,),
+ parent=parent)
+- with_attrs = self.op.run ()
+- self.answers['test_page_job_status'] = with_attrs
++ try:
++ with_attrs = self.op.run ()
++ self.answers['test_page_job_status'] = with_attrs
++ except OperationCanceled:
++ pass
++
+ return self.answers
+
+ def cancel_operation (self):
+@@ -383,6 +397,9 @@ class PrintTestPage(Question):
+ jobs.append (jobid)
+ self.persistent_answers['test_page_job_id'] = jobs
+ break
++ except OperationCanceled:
++ self.persistent_answers['test_page_submit_failure'] = 'cancel'
++ break
+ except RuntimeError:
+ self.persistent_answers['test_page_submit_failure'] = 'connect'
+ break
+@@ -420,7 +437,10 @@ class PrintTestPage(Question):
+ self.op = TimedOperation (cancel_jobs,
+ (jobids,),
+ parent=self.troubleshooter.get_window ())
+- self.op.run ()
++ try:
++ self.op.run ()
++ except OperationCanceled:
++ pass
+
+ def test_toggled (self, cell, path):
+ model = self.treeview.get_model ()
+@@ -447,7 +467,11 @@ class PrintTestPage(Question):
+ self.op = TimedOperation (get_notifications,
+ (self,),
+ parent=parent)
+- notifications = self.op.run ()
++ try:
++ notifications = self.op.run ()
++ except OperationCanceled:
++ gtk.gdk.threads_leave ()
++ return True
+
+ answers = self.troubleshooter.answers
+ model = self.treeview.get_model ()
Index: system-config-printer.spec
===================================================================
RCS file: /cvs/pkgs/rpms/system-config-printer/devel/system-config-printer.spec,v
retrieving revision 1.253
retrieving revision 1.254
diff -u -r1.253 -r1.254
--- system-config-printer.spec 3 Mar 2009 22:34:29 -0000 1.253
+++ system-config-printer.spec 10 Mar 2009 18:32:14 -0000 1.254
@@ -7,13 +7,14 @@
Summary: A printer administration tool
Name: system-config-printer
Version: 1.1.5
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2+
URL: http://cyberelk.net/tim/software/system-config-printer/
Group: System Environment/Base
Source0: http://cyberelk.net/tim/data/system-config-printer/1.1/system-config-printer-%{version}.tar.bz2
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-git-1.1.x.patch
BuildRequires: cups-devel >= 1.2
BuildRequires: python-devel >= 2.4
@@ -63,6 +64,7 @@
%prep
%setup -q -a 1 -a 2
+%patch1 -p1 -b .git-1.1.x
%build
%configure
@@ -165,6 +167,29 @@
exit 0
%changelog
+* Tue Mar 10 2009 Tim Waugh <twaugh at redhat.com> 1.1.5-2
+- Added patch for changes in 1.1.x since 1.1.5:
+ - Strip " hpijs" from PPD names.
+ - Handle there being no operation name set when authentication/retry
+ is required.
+ - Mark "Unauthorized" PolicyKit dialog strings for translation, and
+ change that dialog to an error.
+ - Work around marker-* attributes not being presented as lists
+ (bug #489512).
+ - D-Bus policy tweak.
+ - Better PPD fallback searching.
+ - Fixed model search oddity when no digits in model name.
+ - Fixed locale save/restore in cupshelpers (bug #489313).
+ - Use gtk.show_uri() instead of gnome.url_show() (trac #147).
+ - Removed HPLIP probe screen (no longer needed).
+ - Be certain of having the right cell when starting a rename
+ (Ubuntu #333260).
+ - Fixed strftime call (Ubuntu #334859).
+ - Check dict before use when handling auth-info-required.
+ - Handle timed operations being cancelled in the troubleshooter test
+ print page (Ubuntu #325084).
+ - Put pycups version requirement in monitor module.
+
* Tue Mar 3 2009 Tim Waugh <twaugh at redhat.com> 1.1.5-1
- 1.1.5.
- Previous message (by thread): rpms/xastir/devel xastir-1.9.4-engunits.patch, 1.3, 1.4 xastir-1.9.4-libdir.patch, 1.4, 1.5 .cvsignore, 1.4, 1.5 sources, 1.4, 1.5 xastir.spec, 1.17, 1.18
- Next message (by thread): [pkgdb] leonidas-backgrounds had acl change status
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list