Bug 237863 - rpm does not list all requiring packages
rpm does not list all requiring packages
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora
Classification: Fedora
Component: createrepo (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: James Antill
Fedora Extras Quality Assurance
bzcl34nup
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-25 15:05 EDT by Gijs Hollestelle
Modified: 2014-01-21 17:57 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-06 21:34:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Gijs Hollestelle 2007-04-25 15:05:48 EDT
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.
Comment 1 Jeff Johnson 2007-04-25 16:55:29 EDT
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
Comment 2 Paul Nasrat 2007-05-17 09:43:05 EDT
Possibly yum needs to check the REQUIREFLAGS for interpreter requires if it is
rpm.RPMSENSE_INTERP and agaisnt RPMSENSE_SCRIPT_*.

Comment 3 Seth Vidal 2007-05-17 10:01:53 EDT
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?
Comment 4 Jeremy Katz 2007-06-13 14:24:09 EDT
Adding Paul to cc for Seth's last question.
Comment 5 Panu Matilainen 2007-06-14 04:09:56 EDT
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)
Comment 6 Seth Vidal 2007-11-26 13:15:35 EST
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.

Comment 7 Bug Zapper 2008-04-03 20:16:37 EDT
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.
Comment 8 Bug Zapper 2008-05-06 21:34:03 EDT
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

Note You need to log in before you can comment on or make changes to this bug.