[plug] RPM requires/provides question
Derek Fountain
derekfountain at yahoo.co.uk
Mon Aug 4 21:21:52 WST 2003
I tried the following on the SuSE list, but got no response. Perhaps some RPM
expert on here can help...?
In a desperate attempt to squeeze a little more diskspace for my choked server
I wrote a script which examines all the packages on the box to see which ones
aren't required by any others. I figured these "top leaves" can be removed if
I know I'm not using them.
The script basically does a "rpm -q --provides" for a package, then for each
provided capability, it does a "rpm -q --whatrequires". The packages which
provides capabilities which aren't required by anything else are the ones I
want.
During this process I came across tcsh, which I don't use. It doesn't provide
much:
> rpm -q --provides tcsh
tcsh
and nothing uses that:
> rpm -q --whatrequires tcsh
no package requires tcsh
Ha! 2MB to be saved here! But:
# rpm --erase tcsh
error: removing these packages would break dependencies:
/bin/csh is needed by transfig-3.2.3d-219
/bin/csh is needed by samba-2.2.5-124
Oh. A check confirms:
> rpm -q --whatprovides /bin/csh
tcsh-6.12.00-40
Now I'm confused. The "--provides" operation on tcsh doesn't say it provides
"/bin/csh", but the "--whatprovides" operation on the file says it does.
Why the inconsistency? I'm no expert on RPM. What have I misunderstood?
--
> eatapple
core dump
More information about the plug
mailing list