Bug 475882 - Incorrect statement of "no package requires ..."
Summary: Incorrect statement of "no package requires ..."
Keywords:
Status: CLOSED DUPLICATE of bug 142651
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-10 21:58 UTC by Edwin ten Brink
Modified: 2008-12-11 06:37 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-12-11 06:37:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Edwin ten Brink 2008-12-10 21:58:37 UTC
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
rpm-4.6.0-0.rc1.8.i386

For the example below:
$ rpm -q php-pgsql
php-pgsql-5.2.6-5.i386
$ rpm -q postgresql-libs
postgresql-libs-8.3.5-1.fc10.i386


How reproducible:
Always.


Steps to Reproduce:
Example:
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
libecpg.so.6  
libecpg_compat.so.3  
libpgtypes.so.3  
libpq.so  
libpq.so.5  
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
postgresql-libs-8.3.5-1.fc10.i386

What is required by package php-pgsql?
$ rpm -q --requires php-pgsql
config(php-pgsql) = 5.2.6-5
libc.so.6  
libc.so.6(GLIBC_2.0)  
libc.so.6(GLIBC_2.1.3)  
libc.so.6(GLIBC_2.3)  
libc.so.6(GLIBC_2.4)  
libpq.so.5  
php-common = 5.2.6-5
php-pdo  
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rtld(GNU_HASH)  


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:
None.

Comment 1 Jeff Johnson 2008-12-10 23:46:09 UTC
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 06:37:22 UTC

*** 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.