This commit is contained in:
parent
fc34c147b4
commit
9078910d27
36
system-config-printer-no-packagekit.patch
Normal file
36
system-config-printer-no-packagekit.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
--- system-config-printer-1.3.5/cupshelpers/cupshelpers.py 2011-08-01 10:47:11.614519332 +0100
|
||||||
|
+++ system-config-printer-1.3.5/cupshelpers/cupshelpers.py 2011-08-02 15:45:33.807623959 +0100
|
||||||
|
@@ -21,7 +21,6 @@
|
||||||
|
|
||||||
|
import cups, pprint, os, tempfile, re, string
|
||||||
|
import locale
|
||||||
|
-import packagekit.client, packagekit.enums
|
||||||
|
from . import _debugprint
|
||||||
|
|
||||||
|
class Printer:
|
||||||
|
@@ -829,24 +828,7 @@
|
||||||
|
missing executables
|
||||||
|
"""
|
||||||
|
executables = missingExecutables(ppd)
|
||||||
|
- packages = []
|
||||||
|
- if executables:
|
||||||
|
- unresolved_executables = []
|
||||||
|
- client = packagekit.client.PackageKitClient ()
|
||||||
|
- for executable in executables:
|
||||||
|
- if not executable.startswith ("/"):
|
||||||
|
- executable = "/usr/bin/" + executable
|
||||||
|
-
|
||||||
|
- result = client.search_file ([executable],
|
||||||
|
- packagekit.enums.FILTER_NOT_INSTALLED)
|
||||||
|
- if result:
|
||||||
|
- packages.extend (set (map (lambda x: x.name, result)))
|
||||||
|
- else:
|
||||||
|
- unresolved_executables.append (executable)
|
||||||
|
-
|
||||||
|
- executables = unresolved_executables
|
||||||
|
-
|
||||||
|
- return (packages, executables)
|
||||||
|
+ return ([], executables)
|
||||||
|
|
||||||
|
def _main():
|
||||||
|
c = cups.Connection()
|
@ -1,26 +0,0 @@
|
|||||||
diff -up system-config-printer-1.3.5/cupshelpers/cupshelpers.py.packagekit-optional system-config-printer-1.3.5/cupshelpers/cupshelpers.py
|
|
||||||
--- system-config-printer-1.3.5/cupshelpers/cupshelpers.py.packagekit-optional 2011-07-28 17:04:13.000000000 +0100
|
|
||||||
+++ system-config-printer-1.3.5/cupshelpers/cupshelpers.py 2011-08-01 10:47:11.614519332 +0100
|
|
||||||
@@ -21,8 +21,12 @@
|
|
||||||
|
|
||||||
import cups, pprint, os, tempfile, re, string
|
|
||||||
import locale
|
|
||||||
-import packagekit.client, packagekit.enums
|
|
||||||
from . import _debugprint
|
|
||||||
+try:
|
|
||||||
+ import packagekit.client, packagekit.enums
|
|
||||||
+ HAVE_PACKAGEKIT=True
|
|
||||||
+except ImportError:
|
|
||||||
+ HAVE_PACKAGEKIT=False
|
|
||||||
|
|
||||||
class Printer:
|
|
||||||
_flags_blacklist = ["options", "local"]
|
|
||||||
@@ -830,7 +834,7 @@ def missingPackagesAndExecutables(ppd):
|
|
||||||
"""
|
|
||||||
executables = missingExecutables(ppd)
|
|
||||||
packages = []
|
|
||||||
- if executables:
|
|
||||||
+ if executables and HAVE_PACKAGEKIT:
|
|
||||||
unresolved_executables = []
|
|
||||||
client = packagekit.client.PackageKitClient ()
|
|
||||||
for executable in executables:
|
|
@ -5,14 +5,14 @@
|
|||||||
Summary: A printer administration tool
|
Summary: A printer administration tool
|
||||||
Name: system-config-printer
|
Name: system-config-printer
|
||||||
Version: 1.3.5
|
Version: 1.3.5
|
||||||
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-bug726682.patch
|
Patch2: system-config-printer-bug726682.patch
|
||||||
Patch3: system-config-printer-packagekit-optional.patch
|
Patch3: system-config-printer-no-packagekit.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
|
||||||
@ -80,8 +80,8 @@ printers.
|
|||||||
# Import dbus in serversettings module (bug #726682).
|
# Import dbus in serversettings module (bug #726682).
|
||||||
%patch2 -p1 -b .bug726682
|
%patch2 -p1 -b .bug726682
|
||||||
|
|
||||||
# Make PackageKit optional (bug #726996).
|
# Removed problematic PackageKit client support (bug #726996, bug #726938).
|
||||||
%patch3 -p1 -b .bug726682
|
%patch3 -p1 -b .no-packagekit
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --with-udev-rules
|
%configure --with-udev-rules
|
||||||
@ -209,6 +209,9 @@ if [ $1 -ge 1 ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Aug 2 2011 Tim Waugh <twaugh@redhat.com> 1.3.5-3
|
||||||
|
- Removed problematic PackageKit client support (bug #726996, bug #726938).
|
||||||
|
|
||||||
* Mon Aug 1 2011 Tim Waugh <twaugh@redhat.com> 1.3.5-2
|
* Mon Aug 1 2011 Tim Waugh <twaugh@redhat.com> 1.3.5-2
|
||||||
- Make PackageKit optional (bug #726996).
|
- Make PackageKit optional (bug #726996).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user