diff --git a/rpm-4.8.0-pythondeps-parallel.patch b/rpm-4.8.0-pythondeps-parallel.patch new file mode 100644 index 0000000..9f1fb54 --- /dev/null +++ b/rpm-4.8.0-pythondeps-parallel.patch @@ -0,0 +1,37 @@ +diff --git a/scripts/pythondeps.sh b/scripts/pythondeps.sh +index 7ccd076..7bf6fec 100755 +--- a/scripts/pythondeps.sh ++++ b/scripts/pythondeps.sh +@@ -5,17 +5,27 @@ + exit 0 + } + +-PYVER=`python -c "import sys; v=sys.version_info[:2]; print '%d.%d'%v"` + case $1 in + -P|--provides) + shift +- grep "/usr/bin/python\*\$" >& /dev/null && echo "python(abi) = ${PYVER}" +- exit 0 ++ # Match buildroot/payload paths of the form ++ # /PATH/OF/BUILDROOT/usr/bin/pythonMAJOR.MINOR ++ # generating a line of the form ++ # python(abi) = MAJOR.MINOR ++ # (Don't match against -config tools e.g. /usr/bin/python2.6-config) ++ grep "/usr/bin/python.\..$" \ ++ | sed -e "s|.*/usr/bin/python\(.\..\)|python(abi) = \1|" + ;; + -R|--requires) + shift +- grep "/usr/lib[^/]*/python${PYVER}/" >& /dev/null && echo "python(abi) = ${PYVER}" +- exit 0 ++ # Match buildroot paths of the form ++ # /PATH/OF/BUILDROOT/usr/lib/pythonMAJOR.MINOR/ and ++ # /PATH/OF/BUILDROOT/usr/lib64/pythonMAJOR.MINOR/ ++ # generating (uniqely) lines of the form: ++ # python(abi) = MAJOR.MINOR ++ grep "/usr/lib[^/]*/python.\../*" \ ++ | sed -e "s|.*/usr/lib[^/]*/python\(.\..\)/.*|python(abi) = \1|g" \ ++ | sort | uniq + ;; + esac + diff --git a/rpm.spec b/rpm.spec index 8a2a3b7..9680970 100644 --- a/rpm.spec +++ b/rpm.spec @@ -21,7 +21,7 @@ Summary: The RPM package management system Name: rpm Version: %{rpmver} -Release: 3%{?dist} +Release: 4%{?dist} Group: System Environment/Base Url: http://www.rpm.org/ Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2 @@ -39,6 +39,7 @@ Patch3: rpm-4.7.90-fedora-specspo.patch # Patches already in upstream Patch200: rpm-4.8.0-url-segfault.patch Patch201: rpm-4.8.0-verify-exitcode.patch +Patch202: rpm-4.8.0-pythondeps-parallel.patch # These are not yet upstream Patch301: rpm-4.6.0-niagara.patch @@ -185,6 +186,7 @@ packages on a system. %patch200 -p1 -b .url-segfault %patch201 -p1 -b .verify-exitcode +%patch202 -p1 -b .pythondeps-parallel %patch301 -p1 -b .niagara %patch302 -p1 -b .geode @@ -400,6 +402,9 @@ exit 0 %doc doc/librpm/html/* %changelog +* Sat Jan 30 2010 Panu Matilainen - 4.8.0-4 +- support parallel python versions in python dependency extractor (#532118) + * Thu Jan 21 2010 Panu Matilainen - 4.8.0-3 - fix segfault on failed url retrieval - fix verification error code depending on verbosity level