From f95818ce0641f230fafa22f7db74bcbb7e79bad3 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 22 Mar 2010 13:01:10 +0000 Subject: [PATCH] - Fixed pycups build with new distutils. - Fixed reconnection error handling in IPPAuthOperation class (bug #575198). --- system-config-printer-pycups-build.patch | 12 +++++++++ system-config-printer-reconnect-error.patch | 29 +++++++++++++++++++++ system-config-printer.spec | 19 +++++++++++++- 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-pycups-build.patch create mode 100644 system-config-printer-reconnect-error.patch diff --git a/system-config-printer-pycups-build.patch b/system-config-printer-pycups-build.patch new file mode 100644 index 0000000..76a1e35 --- /dev/null +++ b/system-config-printer-pycups-build.patch @@ -0,0 +1,12 @@ +diff -up pycups-1.9.49/Makefile.pycups-build pycups-1.9.49/Makefile +--- pycups-1.9.49/Makefile.pycups-build 2010-03-22 12:46:31.351447572 +0000 ++++ pycups-1.9.49/Makefile 2010-03-22 12:46:41.155449391 +0000 +@@ -31,7 +31,7 @@ dist: + install: + ROOT= ; \ + if [ -n "$$DESTDIR" ]; then ROOT="--root $$DESTDIR"; fi; \ +- python setup.py install $$ROOT ++ CFLAGS=-DVERSION=\\\"$(VERSION)\\\" python setup.py install $$ROOT + + .PHONY: doc clean dist install + diff --git a/system-config-printer-reconnect-error.patch b/system-config-printer-reconnect-error.patch new file mode 100644 index 0000000..31f5455 --- /dev/null +++ b/system-config-printer-reconnect-error.patch @@ -0,0 +1,29 @@ +diff -up system-config-printer-1.2.0/asyncipp.py.reconnect-error system-config-printer-1.2.0/asyncipp.py +--- system-config-printer-1.2.0/asyncipp.py.reconnect-error 2010-01-27 11:17:44.000000000 +0000 ++++ system-config-printer-1.2.0/asyncipp.py 2010-03-22 11:54:54.320452998 +0000 +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + +-## Copyright (C) 2007, 2008, 2009 Red Hat, Inc. ++## Copyright (C) 2007, 2008, 2009, 2010 Red Hat, Inc. + ## Copyright (C) 2008 Novell, Inc. + ## Author: Tim Waugh + +@@ -333,7 +333,7 @@ class _IPPAuthOperation: + # This is the initial "connection" operation, or a + # subsequent reconnection attempt. + debugprint ("Connection/reconnection failed") +- return self._reconnect_error (exc) ++ return self._reconnect_error (conn, exc) + + if self._cancel: + return self._error (exc) +@@ -353,7 +353,7 @@ class _IPPAuthOperation: + e == cups.IPP_FORBIDDEN): + forbidden = (e == cups.IPP_FORBIDDEN) + elif e == cups.IPP_SERVICE_UNAVAILABLE: +- return self._reconnect_error (exc) ++ return self._reconnect_error (conn, exc) + else: + return self._error (exc) + elif type (exc) == cups.HTTPError: diff --git a/system-config-printer.spec b/system-config-printer.spec index 916b8a0..f940977 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -7,7 +7,7 @@ Summary: A printer administration tool Name: system-config-printer Version: 1.2.0 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -23,6 +23,9 @@ Patch3: system-config-printer-cdi-no-drivers.patch Patch4: system-config-printer-cdi-cmd.patch Patch5: system-config-printer-kyocera-mita.patch Patch6: system-config-printer-cdi-filename.patch +Patch7: system-config-printer-reconnect-error.patch + +Patch100: system-config-printer-pycups-build.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -100,6 +103,16 @@ printers. # check-device-ids.py: Fixed driver-URI to filename mapping. %patch6 -p1 -b .cdi-filename +# Fixed reconnection error handling in IPPAuthOperation class (bug #575198). +%patch7 -p1 -b .reconnect-error + +pushd pycups-%{pycups_version} + +# Fixed pycups build with new distutils. +%patch100 -p1 -b .pycups-build + +popd + %build %configure --with-udev-rules @@ -215,6 +228,10 @@ rm -rf %buildroot exit 0 %changelog +* Mon Mar 22 2010 Tim Waugh - 1.2.0-5 +- Fixed pycups build with new distutils. +- Fixed reconnection error handling in IPPAuthOperation class (bug #575198). + * Fri Mar 19 2010 Tim Waugh - 1.2.0-4 - check-device-ids.py: Fixed driver-URI to filename mapping.