Bug 475882 - Incorrect statement of "no package requires ..."
Incorrect statement of "no package requires ..."
Status: CLOSED DUPLICATE of bug 142651
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-12-10 16:58 EST by Edwin ten Brink
Modified: 2008-12-11 01:37 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-12-11 01:37:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Edwin ten Brink 2008-12-10 16:58:37 EST
Description of problem:
rpm states "no package requires ..." when the package name is not explicitly stated in the requires: in other packages. Therefore it states that the package is not needed. Removal of the package is prohibited since a part of the package is required by another package. It seems that the requires/provides mechanisms operate differently from the checks done at uninstall.

Version-Release number of selected component (if applicable):
Versions used:
$ rpm -q rpm

For the example below:
$ rpm -q php-pgsql
$ rpm -q postgresql-libs

How reproducible:

Steps to Reproduce:
Found a package which is apparently not required by another package.
$ rpm -q --whatrequires postgresql-libs
no package requires postgresql-libs

Try to uninstall it.
# rpm -e postgresql-libs
error: Failed dependencies:
	libpq.so.5 is needed by (installed) php-pgsql-5.2.6-5.i386
	libpq.so.5 is needed by (installed) redland-1.0.7-2.fc10.i386
Fails, fortunately, while the package is actually required, although not
by the name, only by one of the libraries it provides.

RPM is aware of these provides/requires link when queried:

What does the package postgresql-libs provide?
$ rpm -q --provides postgresql-libs
postgresql-libs = 8.3.5-1.fc10
postgresql-libs(x86-32) = 8.3.5-1.fc10

Which package provides libpq.so.5?
$ rpm -q --whatprovides libpq.so.5

What is required by package php-pgsql?
$ rpm -q --requires php-pgsql
config(php-pgsql) = 5.2.6-5
php-common = 5.2.6-5
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1

Actual results:
$ rpm -q --whatrequires postgresql-libs
no package requires postgresql-libs

Expected results:
$ rpm -q --whatrequires postgresql-libs
	libpq.so.5 (in postgresql-libs) is needed by (installed) php-pgsql-5.2.6-5.i386
	libpq.so.5 (in postgresql-libs) is needed by (installed) redland-1.0.7-2.fc10.i386

The link of the library in question with the actual package name would be greatly appreciated (for both query and uninstall). It is very useful when uninstalling multiple packages by hand.

Additional info:
Comment 1 Jeff Johnson 2008-12-10 18:46:09 EST
FYI: rpm5 has --whatneeds instead of --whatrequires to check __ALL__
the Provides: contained in a package that has a Provides: as a given argument,
not just the argument, including file paths, against all other packages that need
__ANYTHING__ in a given package.

Yes, very useful when uninstalling packages using the rpm CLI. But a simple
script wrapper over provides can be done instead.

But that's not the version of rpm for which this bugzilla is intended. But it does
solve the RFE somewhere in this bugzilla no matter what.
Comment 2 Panu Matilainen 2008-12-11 01:37:22 EST

*** This bug has been marked as a duplicate of bug 142651 ***

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