Upstream patch to fix ppdcache traceback (bug #786232).
This commit is contained in:
parent
989eac41de
commit
e96733cb24
31
system-config-printer-ppdcache-enoent.patch
Normal file
31
system-config-printer-ppdcache-enoent.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
diff -up system-config-printer-1.3.8/ppdcache.py.ppdcache-enoent system-config-printer-1.3.8/ppdcache.py
|
||||||
|
--- system-config-printer-1.3.8/ppdcache.py.ppdcache-enoent 2011-10-26 13:14:20.000000000 +0100
|
||||||
|
+++ system-config-printer-1.3.8/ppdcache.py 2012-02-03 15:40:36.215015934 +0000
|
||||||
|
@@ -123,14 +123,20 @@ class PPDCache:
|
||||||
|
# Store an open file object, then remove the actual
|
||||||
|
# file. This way we don't leave temporary files
|
||||||
|
# around.
|
||||||
|
- self._cache[name] = file (filename)
|
||||||
|
- debugprint ("%s: caching %s (fd %d) "
|
||||||
|
- "(%s) - %s" % (self, filename,
|
||||||
|
- self._cache[name].fileno (),
|
||||||
|
- modtime, status))
|
||||||
|
- os.unlink (filename)
|
||||||
|
- self._modtimes[name] = modtime
|
||||||
|
+ try:
|
||||||
|
+ self._cache[name] = file (filename)
|
||||||
|
+ debugprint ("%s: caching %s (fd %d) "
|
||||||
|
+ "(%s) - %s" % (self, filename,
|
||||||
|
+ self._cache[name].fileno (),
|
||||||
|
+ modtime, status))
|
||||||
|
+ os.unlink (filename)
|
||||||
|
+ self._modtimes[name] = modtime
|
||||||
|
+ except IOError:
|
||||||
|
+ # File disappeared?
|
||||||
|
+ debugprint ("%s: file %s disappeared? Unable to cache it"
|
||||||
|
+ % (self, filename))
|
||||||
|
|
||||||
|
+ # Now fetch it from our own cache.
|
||||||
|
self.fetch_ppd (name, callback, check_uptodate=False)
|
||||||
|
else:
|
||||||
|
self._schedule_callback (callback, name,
|
@ -1,13 +1,14 @@
|
|||||||
Summary: A printer administration tool
|
Summary: A printer administration tool
|
||||||
Name: system-config-printer
|
Name: system-config-printer
|
||||||
Version: 1.3.8
|
Version: 1.3.8
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://cyberelk.net/tim/software/system-config-printer/
|
URL: http://cyberelk.net/tim/software/system-config-printer/
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
Source0: http://cyberelk.net/tim/data/system-config-printer/1.3/%{name}-%{version}.tar.xz
|
Source0: http://cyberelk.net/tim/data/system-config-printer/1.3/%{name}-%{version}.tar.xz
|
||||||
Patch1: system-config-printer-no-applet-in-gnome.patch
|
Patch1: system-config-printer-no-applet-in-gnome.patch
|
||||||
Patch2: system-config-printer-1.3.8-debuginfo.patch
|
Patch2: system-config-printer-1.3.8-debuginfo.patch
|
||||||
|
Patch3: system-config-printer-ppdcache-enoent.patch
|
||||||
BuildRequires: cups-devel >= 1.2
|
BuildRequires: cups-devel >= 1.2
|
||||||
BuildRequires: desktop-file-utils >= 0.2.92
|
BuildRequires: desktop-file-utils >= 0.2.92
|
||||||
BuildRequires: gettext-devel
|
BuildRequires: gettext-devel
|
||||||
@ -65,6 +66,8 @@ printers.
|
|||||||
%patch1 -p1 -b .no-applet-in-gnome
|
%patch1 -p1 -b .no-applet-in-gnome
|
||||||
# Fix several debugprints (#785581)
|
# Fix several debugprints (#785581)
|
||||||
%patch2 -p1 -b .debugprint
|
%patch2 -p1 -b .debugprint
|
||||||
|
# Upstream patch to fix ppdcache traceback (bug #786232).
|
||||||
|
%patch3 -p1 -b .ppdcache-enoent
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --with-udev-rules
|
%configure --with-udev-rules
|
||||||
@ -185,6 +188,9 @@ if [ $1 -ge 1 ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Feb 3 2012 Tim Waugh <twaugh@redhat.com> 1.3.8-3
|
||||||
|
- Upstream patch to fix ppdcache traceback (bug #786232).
|
||||||
|
|
||||||
* Mon Jan 30 2012 Jiri Popelka <jpopelka@redhat.com> 1.3.8-2
|
* Mon Jan 30 2012 Jiri Popelka <jpopelka@redhat.com> 1.3.8-2
|
||||||
- Fixed several debugprints (#785581).
|
- Fixed several debugprints (#785581).
|
||||||
- Clean up and modernize spec file.
|
- Clean up and modernize spec file.
|
||||||
|
Loading…
Reference in New Issue
Block a user