rpms/hplip/devel hplip-no-root-config.patch, 1.9, 1.10 hplip.spec, 1.201, 1.202
Tim Waugh
twaugh at fedoraproject.org
Mon Mar 9 17:45:24 UTC 2009
Author: twaugh
Update of /cvs/pkgs/rpms/hplip/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22064
Modified Files:
hplip-no-root-config.patch hplip.spec
Log Message:
* Mon Mar 9 2009 Tim Waugh <twaugh at redhat.com> 3.9.2-4
- Fixed no-root-config patch (bug #489055).
hplip-no-root-config.patch:
Index: hplip-no-root-config.patch
===================================================================
RCS file: /cvs/pkgs/rpms/hplip/devel/hplip-no-root-config.patch,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- hplip-no-root-config.patch 20 Feb 2009 13:13:49 -0000 1.9
+++ hplip-no-root-config.patch 9 Mar 2009 17:45:22 -0000 1.10
@@ -1,30 +1,30 @@
diff -up hplip-3.9.2/base/g.py.no-root-config hplip-3.9.2/base/g.py
--- hplip-3.9.2/base/g.py.no-root-config 2009-02-20 00:36:51.000000000 +0000
-+++ hplip-3.9.2/base/g.py 2009-02-20 11:13:28.000000000 +0000
-@@ -110,6 +110,10 @@ class ConfigBase(object):
- keys = options
++++ hplip-3.9.2/base/g.py 2009-03-09 17:43:15.000000000 +0000
+@@ -111,6 +111,10 @@ class ConfigBase(object):
def read(self):
-+ if filename.startswith ("/root/") or filename.startswith ("/var/"):
-+ # Don't try opening a file in root's home directory.
-+ return
-+
if self.filename is not None:
++ filename = self.filename
++ if filename.startswith ("/root/") or filename.startswith ("/var/"):
++ # Don't try opening a file in root's home directory.
++ return
try:
fp = open(self.filename, "r")
-@@ -119,6 +123,15 @@ class ConfigBase(object):
- log.debug("Unable to open file %s for reading." % self.filename)
+ self.conf.readfp(fp)
+@@ -120,6 +124,15 @@ class ConfigBase(object):
def write(self):
-+ filename = self.filename
-+ if filename.startswith ("/root/") or filename.startswith ("/var/"):
-+ # Don't try writing a file in root's home directory.
-+ return
-+ elif filename.startswith ("/etc/"):
-+ # Certainly don't try writing the system-wide config file!
-+ # See bug #479178.
-+ return
-+
if self.filename is not None:
++ filename = self.filename
++ if filename.startswith ("/root/") or filename.startswith ("/var/"):
++ # Don't try writing a file in root's home directory.
++ return
++ elif filename.startswith ("/etc/"):
++ # Certainly don't try writing the system-wide config file!
++ # See bug #479178.
++ return
++
try:
fp = open(self.filename, "w")
+ self.conf.write(fp)
Index: hplip.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hplip/devel/hplip.spec,v
retrieving revision 1.201
retrieving revision 1.202
diff -u -r1.201 -r1.202
--- hplip.spec 25 Feb 2009 04:00:40 -0000 1.201
+++ hplip.spec 9 Mar 2009 17:45:23 -0000 1.202
@@ -1,7 +1,7 @@
Summary: HP Linux Imaging and Printing Project
Name: hplip
Version: 3.9.2
-Release: 3%{?dist}
+Release: 4%{?dist}
License: GPLv2+ and MIT
Group: System Environment/Daemons
Conflicts: system-config-printer < 0.6.132
@@ -326,6 +326,9 @@
exit 0
%changelog
+* Mon Mar 9 2009 Tim Waugh <twaugh at redhat.com> 3.9.2-4
+- Fixed no-root-config patch (bug #489055).
+
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.9.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
More information about the fedora-extras-commits
mailing list