rpms/hal-cups-utils/devel hal-cups-utils-git.patch, 1.1, 1.2 hal-cups-utils.spec, 1.73, 1.74

Tim Waugh twaugh at fedoraproject.org
Fri Oct 24 16:27:05 UTC 2008


Author: twaugh

Update of /cvs/pkgs/rpms/hal-cups-utils/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19011

Modified Files:
	hal-cups-utils-git.patch hal-cups-utils.spec 
Log Message:
* Fri Oct 24 2008 Tim Waugh <twaugh at redhat.com> 0.6.17-4
- Don't fail due to missing usb Python module (bug #468408).


hal-cups-utils-git.patch:

Index: hal-cups-utils-git.patch
===================================================================
RCS file: /cvs/pkgs/rpms/hal-cups-utils/devel/hal-cups-utils-git.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- hal-cups-utils-git.patch	22 Oct 2008 14:10:41 -0000	1.1
+++ hal-cups-utils-git.patch	24 Oct 2008 16:27:04 -0000	1.2
@@ -1,8 +1,11 @@
-diff --git a/ChangeLog b/ChangeLog
-index 8bdee6c..e6b0b38 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,44 @@
+diff -U0 hal-cups-utils-0.6.17/ChangeLog.git hal-cups-utils-0.6.17/ChangeLog
+--- hal-cups-utils-0.6.17/ChangeLog.git	2008-07-07 18:31:36.000000000 +0100
++++ hal-cups-utils-0.6.17/ChangeLog	2008-10-24 17:25:51.000000000 +0100
+@@ -0,0 +1,45 @@
++2008-10-24  Tim Waugh  <twaugh at redhat.com>
++
++	* systemv/hal_lpadmin: Don't fail if there is no usb module.
++
 +2008-10-16  Tim Waugh  <twaugh at redhat.com>
 +
 +	* systemv/hal_lpadmin (main): Don't log a traceback if sys.exit()
@@ -44,13 +47,9 @@
 +	HPLIP-driven HP printers get enabled and disabled correctly
 +	depending on whether the printer is turned on or off.
 +
- 2008-07-07  Tim Waugh  <twaugh at redhat.com>
- 
- 	* configure.in: Version 0.6.17.
-diff --git a/systemv/10-hal_lpadmin.fdi b/systemv/10-hal_lpadmin.fdi
-index 8744278..bd265b4 100644
---- a/systemv/10-hal_lpadmin.fdi
-+++ b/systemv/10-hal_lpadmin.fdi
+diff -up hal-cups-utils-0.6.17/systemv/10-hal_lpadmin.fdi.git hal-cups-utils-0.6.17/systemv/10-hal_lpadmin.fdi
+--- hal-cups-utils-0.6.17/systemv/10-hal_lpadmin.fdi.git	2008-07-05 12:45:03.000000000 +0100
++++ hal-cups-utils-0.6.17/systemv/10-hal_lpadmin.fdi	2008-10-24 17:25:51.000000000 +0100
 @@ -11,5 +11,18 @@
        <append key="org.freedesktop.Hal.Device.Printer.method_execpaths" type="strlist">hal_lpadmin --configure</append>
        <append key="org.freedesktop.Hal.Device.Printer.method_argnames" type="strlist">make model</append>
@@ -70,18 +69,21 @@
 +    </match>
    </device>
  </deviceinfo>
-diff --git a/systemv/hal_lpadmin b/systemv/hal_lpadmin
-index 6b4bebe..586ed19 100755
---- a/systemv/hal_lpadmin
-+++ b/systemv/hal_lpadmin
-@@ -1,5 +1,5 @@
- #!/bin/env python
--import dbus, sys, os, time, signal, re
-+import dbus, sys, os, time, signal, re, usb
+diff -up hal-cups-utils-0.6.17/systemv/hal_lpadmin.git hal-cups-utils-0.6.17/systemv/hal_lpadmin
+--- hal-cups-utils-0.6.17/systemv/hal_lpadmin.git	2008-07-05 12:45:03.000000000 +0100
++++ hal-cups-utils-0.6.17/systemv/hal_lpadmin	2008-10-24 17:25:51.000000000 +0100
+@@ -3,6 +3,10 @@ import dbus, sys, os, time, signal, re
  import traceback
  import cups, cupshelpers
  from syslog import *
-@@ -57,18 +57,161 @@ class HalPrinter:
++try:
++    import usb
++except:
++    pass
+ 
+ def get_hplip_uris_for_usb (fax=False, checkuri=None):
+     hpuris = []
+@@ -57,18 +61,161 @@ class HalPrinter:
                  name = key[9:].lower().replace("_", '.')
                  self.properties[name] = value
          self.uid = os.getenv("UDI", "")
@@ -249,7 +251,7 @@
  
      def get_name(self):
          # XXX check for unallowed chars
-@@ -199,6 +342,35 @@ class HalPrinter:
+@@ -199,6 +346,35 @@ class HalPrinter:
          else:
              return None
  
@@ -285,7 +287,7 @@
      def add(self):
          syslog (LOG_DEBUG, "add")
          printers = cupshelpers.getPrinters(self.cups_connection)
-@@ -314,6 +486,11 @@ class HalPrinter:
+@@ -314,6 +490,11 @@ class HalPrinter:
                                                  device=self.get_cups_uri(),
                                                  ppdname=ppdname, info=info,
                                                  location=os.uname ()[1])
@@ -297,7 +299,7 @@
                  self.cups_connection.enablePrinter(self.name)
                  self.cups_connection.acceptJobs(self.name)
                  syslog (LOG_INFO, "Added printer %s" % self.name)
-@@ -367,9 +544,8 @@ class HalPrinter:
+@@ -367,9 +548,8 @@ class HalPrinter:
          # which we will disable.
          printers = cupshelpers.getPrinters(self.cups_connection)
          printers_extra_info = None
@@ -309,7 +311,7 @@
          serial = self.properties.get ("printer.serial", None)
          if not serial:
              serial = self.properties.get ("info.udi", None)
-@@ -382,27 +558,36 @@ class HalPrinter:
+@@ -382,27 +562,36 @@ class HalPrinter:
                      serial = resg[0]
          bus = self.properties.get ("linux.subsystem", None)
          udi = self.properties.get ("info.udi", None)
@@ -357,7 +359,7 @@
                           not printer.device_uri.startswith ("hpfax:")) or
                          (bus == "usb" and
                           printer.device_uri.find ("/usb/") != -1 and
-@@ -459,21 +644,27 @@ class HalLpAdmin:
+@@ -459,21 +648,27 @@ class HalLpAdmin:
  
      def addPrinter(self):
          printer = HalPrinter()


Index: hal-cups-utils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hal-cups-utils/devel/hal-cups-utils.spec,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- hal-cups-utils.spec	22 Oct 2008 14:10:41 -0000	1.73
+++ hal-cups-utils.spec	24 Oct 2008 16:27:04 -0000	1.74
@@ -1,7 +1,7 @@
 Summary: Halified CUPS utilities 
 Name: hal-cups-utils
 Version: 0.6.17
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: GPLv2
 Group: Applications/System
 URL: https://fedorahosted.org/hal-cups-utils
@@ -62,6 +62,9 @@
 %{_initrddir}/cups-config-daemon
 
 %changelog
+* Fri Oct 24 2008 Tim Waugh <twaugh at redhat.com> 0.6.17-4
+- Don't fail due to missing usb Python module (bug #468408).
+
 * Wed Oct 22 2008 Tim Waugh <twaugh at redhat.com> 0.6.17-3
 - Added patch from git to prevent traceback (bug #468010).
 




More information about the scm-commits mailing list