public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: - couple of fixes to the postscript provides extractor (#538101)
@ 2026-11-23 9:26 Panu Matilainen
0 siblings, 0 replies; only message in thread
From: Panu Matilainen @ 2026-11-23 9:26 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 41225dc3c094241a388919441b9e042a780ac756
Author : Panu Matilainen <pmatilai@fedoraproject.org>
Date : 2010-02-05T12:59:00+00:00
Stats : +93/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/41225dc3c094241a388919441b9e042a780ac756?branch=pmatilai-v6
Log:
- couple of fixes to the postscript provides extractor (#538101)
---
diff --git a/rpm-4.8.0-psdriver-fixes.patch b/rpm-4.8.0-psdriver-fixes.patch
new file mode 100644
index 0000000..52e998c
--- /dev/null
+++ b/rpm-4.8.0-psdriver-fixes.patch
@@ -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:
diff --git a/rpm.spec b/rpm.spec
index a268d69..062aae0 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -21,7 +21,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
-Release: 6%{?dist}
+Release: 7%{?dist}
Group: System Environment/Base
Url: http://www.rpm.org/
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
Patch3: rpm-4.7.90-fedora-specspo.patch
# Postscript driver provides extraction is Fedora specific for now
+# TODO: merge these when things stabilize
Patch4: rpm-4.8.0-psdriver.patch
+Patch5: rpm-4.8.0-psdriver-fixes.patch
# Patches already in upstream
Patch200: rpm-4.8.0-url-segfault.patch
@@ -187,6 +189,7 @@ packages on a system.
%patch2 -p1 -b .gstreamer-prov
%patch3 -p1 -b .fedora-specspo
%patch4 -p1 -b .psdriver
+%patch5 -p1 -b .psdriver-fixes
%patch200 -p1 -b .url-segfault
%patch201 -p1 -b .verify-exitcode
@@ -408,6 +411,9 @@ exit 0
%doc doc/librpm/html/*
%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
- extract provides for postscript printer drivers (#538101)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-23 9:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 9:26 [rpms/rpm] pmatilai-v6: - couple of fixes to the postscript provides extractor (#538101) Panu Matilainen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox