On Mon, 14 Jan 2002, Brian J. Murrell wrote:

> I thought the following little few lines of bash would do it:
> 
> rpm -qa | sed -e 's/-[0-9.]*-.*//' | while read pkg;
> do
>     echo -e "$pkg: \c ";
>     rpm -q --whatrequires $pkg | tr "\n" " ";
>     echo;
> done | grep "no package requires"
> 
> and I do get lots of packages but when they are libs (just what I am
> targeting first) most of them have implicit dependancies on the libs
> contained in them.  For instance:
> 
> libgd1: no package requires libgd1 
> # rpm -e libgd1
> error: removing these packages would break dependencies:
>     libgd.so.1   is needed by gnuplot-3.7.1-22mdk
>     libgd.so.1   is needed by linuxconf-1.26r5-1mdk

This won't work as expected. Just use the example above, what it
executes is:

        rpm -q --whatrequires libgd1

which returns nothing, since packages are having implicit dependency
instead (requires libgd.so.1).

Abel


Reply via email to