rpm, yum and inconsistent dependencies

Todd Zullinger tmz at pobox.com
Mon Sep 17 20:00:48 UTC 2007


Robert P. J. Day wrote:
>  just an observation -- i wanted to remove the mysql-related packages
> from my f8t1 system and, before i did that, i decided to check for
> dependencies.  one of the commands i ran:
> 
> # rpm -q --whatrequires mysql-libs
> mysql-5.0.45-4.fc8
> #
> 
>  however, i also noticed this:
> 
> # rpm -qR amarok
> ...
> libmysqlclient.so.15
> libmysqlclient.so.15(libmysqlclient_15)
> ...
> 
>  but "mysql-libs" *is* the package that supplies that shared library.
> shouldn't the rpm dependencies query be able to figure that out?

It would.  Try "rpm -e --test mysql-libs" and see if it says amarok
needs it.

The confusion is likely due to assuming that --whatrequires mysql-libs
means "what requires the package mysql-libs and all that it provides."
This isn't what the option does.  From the fine manual:

--whatrequires CAPABILITY
        Query all packages that requires CAPABILITY for proper
        functioning.

You could use rpm -q --whatrequires libmysqlclient.so.15 to see things
that require the library.  Or you could use something like this to see
what requires the things provided by mysql-libs:

rpm -q --whatrequires $(rpm -q --provides mysql-libs | \
    awk '{print $1}') | sort -u

Not pretty, but sometimes useful.  Generally, it's easier to use yum
or repoquery.

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Talk is cheap because supply exceeds demand.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 542 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20070917/ce9ee2ba/attachment-0001.bin 


More information about the users mailing list