Description of problem: rpm (and rpm python bindings) do not correctly list all packages that require a certain file (in this case /bin/sh) Version-Release number of selected component (if applicable): Was able to reproduce in fc5,fc6 and fc7 rawhide rpm-4.4.2-40.fc7 How reproducible: [gijs@fc7-test3 gijs]% rpm -q --whatrequires '/bin/sh' | grep glibc-headers Does not list anything, while [gijs@fc7-test3 gijs]% rpm -q --requires glibc-headers Does show that glibc-headers requires /bin/sh Also rpm -e --test bash does not list glibc-headers as a conflict. Actual results: rpm -q --whatrequires '/bin/sh' does not list glibc-headers Expected results: rpm -q --whatrequires '/bin/sh' does list glibc-headers Additional info: This causes problems in yum as well which won't remove glibc-headers as a dependency of the bash package.
glibc-headers needs /bin/sh only when installing, not when installed or erasing: $ rpm -q --scripts glibc-headers preinstall scriptlet (using /bin/sh): # this used to be a link and it is causing nightmares now if [ -L /usr/include/scsi ] ; then rm -f /usr/include/scsi fi So there is no dependency on /bin/sh by glibc-headers when installed or erasing, only while installing where %pre runs. NOTABUG
Possibly yum needs to check the REQUIREFLAGS for interpreter requires if it is rpm.RPMSENSE_INTERP and agaisnt RPMSENSE_SCRIPT_*.
Paul, Whats the difference b/t those two and wouldn't we need that info in the metadata? Moreover, it seems like what Gijs was reporting was that it's not visible in rpm-python so how would we fix it in yum if rpm-python isn't seeing it?
Adding Paul to cc for Seth's last question.
I'm not Paul :) but... Like Jeff said, rpm and yum are right to allow removal of /bin/sh without removing glibc-headers because it only needs it on installation, not to run or to remove. And yes the information is visible in rpm-python: >>> h['name']'glibc-headers' >>> h[rpm.RPMTAG_REQUIRENAME] ['/bin/sh', 'glibc', 'kernel-headers', 'kernel-headers', 'rpmlib(CompressedFileNames)', 'rpmlib(PayloadFilesHavePrefix)'] >>> h[rpm.RPMTAG_REQUIREFLAGS][0] & rpm.RPMSENSE_SCRIPT_PRE == rpm.RPMSENSE_SCRIPT_PRE True If there's a bug here, it's in the fact that the metadata is taking nasty shortcuts: it (createrepo) doesn't know about pre/post etc dependency differences, it just relies on the legacy RPMSENSE_PREREQ flag to be set for all scriptlet dependencies instead of looking at RPMSENSE_SCRIPT_* flags like it really should. To Seth's question: RPMSENSE_INTERP flag is always set for scriptlet dependencies (except for internal Lua scriptlets), RPMSENSE_SCRIPT_* tells what type of scriptlet the dependency is for (pre, post etc)
So the mods to createrepo would be to add a check to each dependency to see when it is requiring it and append that to the dep information? I just want to make sure that's what you're explaining here.
Based on the date this bug was created, it appears to have been reported against rawhide during the development of a Fedora release that is no longer maintained. In order to refocus our efforts as a project we are flagging all of the open bugs for releases which are no longer maintained. If this bug remains in NEEDINFO thirty (30) days from now, we will automatically close it. If you can reproduce this bug in a maintained Fedora version (7, 8, or rawhide), please change this bug to the respective version and change the status to ASSIGNED. (If you're unable to change the bug's version or status, add a comment to the bug and someone will change it for you.) Thanks for your help, and we apologize again that we haven't handled these issues to this point. The process we're following is outlined here: http://fedoraproject.org/wiki/BugZappers/F9CleanUp We will be following the process here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this doesn't happen again.
This bug has been in NEEDINFO for more than 30 days since feedback was first requested. As a result we are closing it. If you can reproduce this bug in the future against a maintained Fedora version please feel free to reopen it against that version. The process we're following is outlined here: http://fedoraproject.org/wiki/BugZappers/F9CleanUp