- couple of fixes to the postscript provides extractor (#538101)
This commit is contained in:
parent
aa664c798d
commit
41225dc3c0
86
rpm-4.8.0-psdriver-fixes.patch
Normal file
86
rpm-4.8.0-psdriver-fixes.patch
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
--- rpm-4.8.0/macros.in 2010-02-04 17:42:32.228100971 +0000
|
||||||
|
+++ rpm-4.8.0/macros.in.postscriptdriver-fixes 2010-02-04 17:43:03.867226950 +0000
|
||||||
|
@@ -504,7 +504,7 @@ print (t)\
|
||||||
|
|
||||||
|
%__fontconfig_provides %{_rpmconfigdir}/fontconfig.prov
|
||||||
|
%__desktop_provides %{_rpmconfigdir}/desktop-file.prov
|
||||||
|
-%__psdriver_provides %{_rpmconfigdir}/postscriptdriver.prov
|
||||||
|
+%__psdriver_provides %{_rpmconfigdir}/postscriptdriver.prov %{buildroot}
|
||||||
|
|
||||||
|
#==============================================================================
|
||||||
|
# ---- Database configuration macros.
|
||||||
|
--- rpm-4.8.0/scripts/postscriptdriver.prov 2010-02-04 17:25:15.672102648 +0000
|
||||||
|
+++ rpm-4.8.0/scripts/postscriptdriver.prov.postscriptdriver-fixes 2010-02-05 10:46:44.517778993 +0000
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
shopt -s execfail
|
||||||
|
-exec -a "$0" python -- "$@" <(tail -n +4 -- "$0") || exit 0 # -*- python -*-
|
||||||
|
+exec -a "$0" python -- <(tail -n +4 -- "$0") "$@" || exit 0 # -*- python -*-
|
||||||
|
|
||||||
|
## Copyright (C) 2009, 2010 Red Hat, Inc.
|
||||||
|
## Author: Tim Waugh <twaugh@redhat.com>
|
||||||
|
@@ -23,21 +23,26 @@ import sys
|
||||||
|
|
||||||
|
try:
|
||||||
|
import cups
|
||||||
|
- CAN_EXAMINE_PPDS=True
|
||||||
|
+ CAN_EXAMINE_PPDS = True
|
||||||
|
except:
|
||||||
|
- CAN_EXAMINE_PPDS=False
|
||||||
|
+ CAN_EXAMINE_PPDS = False
|
||||||
|
|
||||||
|
from getopt import getopt
|
||||||
|
+import errno
|
||||||
|
import os
|
||||||
|
import posix
|
||||||
|
import re
|
||||||
|
import shlex
|
||||||
|
import signal
|
||||||
|
-import stat
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
import tempfile
|
||||||
|
|
||||||
|
+if len (sys.argv) > 1:
|
||||||
|
+ RPM_BUILD_ROOT = sys.argv[1]
|
||||||
|
+else:
|
||||||
|
+ RPM_BUILD_ROOT = None
|
||||||
|
+
|
||||||
|
class TimedOut(Exception):
|
||||||
|
def __init__ (self):
|
||||||
|
Exception.__init__ (self, "Timed out")
|
||||||
|
@@ -139,9 +144,20 @@ class DynamicDriver(Driver):
|
||||||
|
|
||||||
|
def list (self):
|
||||||
|
signal.alarm (60)
|
||||||
|
+ env = os.environ.copy ()
|
||||||
|
+ if RPM_BUILD_ROOT:
|
||||||
|
+ buildroot = RPM_BUILD_ROOT
|
||||||
|
+ if not buildroot.endswith (os.path.sep):
|
||||||
|
+ buildroot += os.path.sep
|
||||||
|
+
|
||||||
|
+ env["DESTDIR"] = RPM_BUILD_ROOT
|
||||||
|
+ env["LD_LIBRARY_PATH"] = "%susr/lib64:%susr/lib" % (buildroot,
|
||||||
|
+ buildroot)
|
||||||
|
+
|
||||||
|
p = subprocess.Popen ([self.driver, "list"],
|
||||||
|
stdout=subprocess.PIPE,
|
||||||
|
- stderr=subprocess.PIPE)
|
||||||
|
+ stderr=subprocess.PIPE,
|
||||||
|
+ env=env)
|
||||||
|
try:
|
||||||
|
(stdout, stderr) = p.communicate ()
|
||||||
|
signal.alarm (0)
|
||||||
|
@@ -214,6 +230,12 @@ class TagBuilder:
|
||||||
|
self.ids += DynamicDriver (path).list ()
|
||||||
|
except TimedOut:
|
||||||
|
pass
|
||||||
|
+ except OSError, e:
|
||||||
|
+ if e == errno.EACCES or e == errno.ENOENT:
|
||||||
|
+ # Not executable
|
||||||
|
+ pass
|
||||||
|
+ else:
|
||||||
|
+ raise
|
||||||
|
|
||||||
|
if CAN_EXAMINE_PPDS:
|
||||||
|
for path in paths:
|
8
rpm.spec
8
rpm.spec
@ -21,7 +21,7 @@
|
|||||||
Summary: The RPM package management system
|
Summary: The RPM package management system
|
||||||
Name: rpm
|
Name: rpm
|
||||||
Version: %{rpmver}
|
Version: %{rpmver}
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
Url: http://www.rpm.org/
|
Url: http://www.rpm.org/
|
||||||
Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
|
Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
|
||||||
@ -36,7 +36,9 @@ Patch2: rpm-4.5.90-gstreamer-provides.patch
|
|||||||
# this as Fedora-specific patch for now
|
# this as Fedora-specific patch for now
|
||||||
Patch3: rpm-4.7.90-fedora-specspo.patch
|
Patch3: rpm-4.7.90-fedora-specspo.patch
|
||||||
# Postscript driver provides extraction is Fedora specific for now
|
# Postscript driver provides extraction is Fedora specific for now
|
||||||
|
# TODO: merge these when things stabilize
|
||||||
Patch4: rpm-4.8.0-psdriver.patch
|
Patch4: rpm-4.8.0-psdriver.patch
|
||||||
|
Patch5: rpm-4.8.0-psdriver-fixes.patch
|
||||||
|
|
||||||
# Patches already in upstream
|
# Patches already in upstream
|
||||||
Patch200: rpm-4.8.0-url-segfault.patch
|
Patch200: rpm-4.8.0-url-segfault.patch
|
||||||
@ -187,6 +189,7 @@ packages on a system.
|
|||||||
%patch2 -p1 -b .gstreamer-prov
|
%patch2 -p1 -b .gstreamer-prov
|
||||||
%patch3 -p1 -b .fedora-specspo
|
%patch3 -p1 -b .fedora-specspo
|
||||||
%patch4 -p1 -b .psdriver
|
%patch4 -p1 -b .psdriver
|
||||||
|
%patch5 -p1 -b .psdriver-fixes
|
||||||
|
|
||||||
%patch200 -p1 -b .url-segfault
|
%patch200 -p1 -b .url-segfault
|
||||||
%patch201 -p1 -b .verify-exitcode
|
%patch201 -p1 -b .verify-exitcode
|
||||||
@ -408,6 +411,9 @@ exit 0
|
|||||||
%doc doc/librpm/html/*
|
%doc doc/librpm/html/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Feb 05 2010 Panu Matilainen <pmatilai@redhat.com> - 4.8.0-7
|
||||||
|
- couple of fixes to the postscript provides extractor (#538101)
|
||||||
|
|
||||||
* Thu Feb 04 2010 Panu Matilainen <pmatilai@redhat.com> - 4.8.0-6
|
* Thu Feb 04 2010 Panu Matilainen <pmatilai@redhat.com> - 4.8.0-6
|
||||||
- extract provides for postscript printer drivers (#538101)
|
- extract provides for postscript printer drivers (#538101)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user