Description of problem: I introduced a one-character error in my rewrite of /usr/lib/rpm/pythondeps.sh for bug 532118 (sorry), which first landed in rpm-4.8.0-4.fc13 This shows up in my build of python-2.6.4-14.fc13: the core python rpm gained a dep on "/builddir/build/BUILDROOT/python-2.6.4-14.fc13.i386/usr/lib/python2.6" (see http://koji.fedoraproject.org/koji/buildinfo?buildID=154675 and http://koji.fedoraproject.org/koji/rpminfo?rpmID=1803012 ) See pythondeps.sh script in https://bugzilla.redhat.com/attachment.cgi?id=366839 The --requires case in this script has this initial grep of the : grep "/usr/lib[^/]*/python.\../*" \ which then gets passed into a sed, which maps paths of the form /usr/lib[^/]*/python\(.\..\)/.* to python(abi)=\1 Unfortunately the grep matches slightly too much; it is matching the directory as well as the paths within it, and this directory is not getting changed within the sed, leading to the path within the BUILDROOT appearing in the reequires. I believe the fix is to change the initial grep from: grep "/usr/lib[^/]*/python.\../*" \ to: grep "/usr/lib[^/]*/python.\../.*" \ (In my mind I was thinking of shell wildcard when I wrote that final "/*", but grep treats it as "zero or more slash characters") Without this change, I get: # find /root/rpmbuild/BUILDROOT/python-2.6.4-14.fc13.i386 | /usr/lib/rpm/pythondeps.sh --requires python(abi) = 2.6 /root/rpmbuild/BUILDROOT/python-2.6.4-14.fc13.i386/usr/lib/debug/usr/lib/python2.6 /root/rpmbuild/BUILDROOT/python-2.6.4-14.fc13.i386/usr/lib/python2.6 With this change, I get: # find /root/rpmbuild/BUILDROOT/python-2.6.4-14.fc13.i386 | /usr/lib/rpm/pythondeps.sh --requires python(abi) = 2.6 Sorry about this. Version-Release number of selected component (if applicable): Seen with rpm-build-4.8.0-8.fc13.i686, but I'm fairly sure this is my fault, and due to: * Sat Jan 30 2010 Panu Matilainen <pmatilai> - 4.8.0-4 - support parallel python versions in python dependency extractor (#532118) How reproducible: 100% Steps to Reproduce: 1. try to rebuild python in rawhide Actual results: rpm -qpR python-2.6.4-whatever has a requirement on BUILDROOT_PATH/usr/lib/python directory Expected results: Shouldn't have the dependency Additional info: I suspect it's possible to hack around this by setting %{__python_requires} in the python.spec file, but obviously that's a hack. (However we're close to feature freeze, and I need to rebuild python)
Better test cases (echoing paths, rather than requiring a buildroot to do "find") # echo /root/rpmbuild/BUILDROOT/python-2.6.4-14.fc13.i386/usr/lib/python2.6/foo.py \ | /usr/lib/rpm/pythondeps.sh --requires python(abi) = 2.6 (i.e. should contain "python(abi)=2.6") whereas: # echo /root/rpmbuild/BUILDROOT/python-2.6.4-14.fc13.i386/usr/lib/python2.6 \ | /usr/lib/rpm/pythondeps.sh --requires should be empty
Suggested fix applied in rpm-4.8.0-9.fc13.