[hplip/f13/master] Fixed utils.addgroup() to return array instead of string (bug #642771).

Jiří Popelka jpopelka at fedoraproject.org
Thu Oct 14 09:59:32 UTC 2010


commit 74ded0ec4a2a768df57dac701b59f6c3f9a4da8f
Author: Jiri Popelka <jpopelka at redhat.com>
Date:   Thu Oct 14 11:56:08 2010 +0200

    Fixed utils.addgroup() to return array instead of string (bug #642771).

 hplip-addgroup.patch |   14 ++++++++++++++
 hplip.spec           |    9 ++++++++-
 2 files changed, 22 insertions(+), 1 deletions(-)
---
diff --git a/hplip-addgroup.patch b/hplip-addgroup.patch
new file mode 100644
index 0000000..8f26a47
--- /dev/null
+++ b/hplip-addgroup.patch
@@ -0,0 +1,14 @@
+diff -up hplip-3.10.9/base/utils.py.addgroup hplip-3.10.9/base/utils.py
+--- hplip-3.10.9/base/utils.py.addgroup	2010-10-14 10:52:34.000000000 +0200
++++ hplip-3.10.9/base/utils.py	2010-10-14 11:35:17.000000000 +0200
+@@ -65,8 +65,8 @@ def addgroup():
+         fp=open('/etc/cups/cupsd.conf')
+     except IOError:
+         try:
+-            if "root" != grp.getgrgid(os.stat('/etc/cups/cupsd.conf').st_gid)[0]:
+-                return grp.getgrgid(os.stat('/etc/cups/cupsd.conf').st_gid)[0]
++            if "root" != grp.getgrgid(os.stat('/etc/cups/cupsd.conf').st_gid).gr_name:
++                return [grp.getgrgid(os.stat('/etc/cups/cupsd.conf').st_gid).gr_name]
+         except OSError:
+             return lis
+ 
diff --git a/hplip.spec b/hplip.spec
index d1b4e42..cd87a80 100644
--- a/hplip.spec
+++ b/hplip.spec
@@ -1,7 +1,7 @@
 Summary: HP Linux Imaging and Printing Project
 Name: hplip
 Version: 3.10.9
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv2+ and MIT
 Group: System Environment/Daemons
 Conflicts: system-config-printer < 0.6.132
@@ -36,6 +36,7 @@ Patch20: hplip-no-system-tray.patch
 Patch21: hplip-openPPD.patch
 Patch22: hplip-ppd-ImageableArea.patch
 Patch23: hplip-network-timeout.patch
+Patch24: hplip-addgroup.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -230,6 +231,9 @@ done
 # Increase timeouts for curl, wget, ping for high latency networks (bug #635388).
 %patch23 -p1 -b .network-timeout
 
+# utils.addgroup() was returning string instead of array (bug #642771).
+%patch24 -p1 -b .addgroup
+
 sed -i.duplex-constraints \
     -e 's,\(UIConstraints.* \*Duplex\),//\1,' \
     prnt/drv/hpcups.drv.in
@@ -456,6 +460,9 @@ fi
 %postun libs -p /sbin/ldconfig
 
 %changelog
+* Thu Oct 14 2010 Jiri Popelka <jpopelka at redhat.com> - 3.10.9-2
+- Fixed utils.addgroup() to return array instead of string (bug #642771).
+
 * Mon Oct 04 2010 Jiri Popelka <jpopelka at redhat.com> - 3.10.9-1
 - 3.10.9.
 


More information about the scm-commits mailing list