how to determain those no longer required packages

Matthew Woehlke mw_triad at users.sourceforge.net
Wed Sep 2 23:16:30 UTC 2009


James Antill wrote:
> ATM we
> don't carry reason=dep across updates

To ask the obvious... why not? An update is not necessarily a user 
action (I run 'yum upgrade -y' in cron jobs on two machines, and may 
start doing it on more).

IMO updating an existing package should *never* change the reason. 
Installing a package via update should only set reason="user" if the 
package was named in the arguments to yum (which should be the behavior 
also for 'yum install', actually).

...and I suppose 'yum update' should warn when updating a package named 
in the arguments if that package is not marked reason="user". (Why not 
auto-mark? Because maybe I am updating a library to fix a bug in some 
dependent program I use; I probably don't care about keeping that 
library if I later remove the program that needs it.)

>  Probably the sanest request here is that if you do:
> 
> 1. yum install blah
> 2. <try out blah, don't like it>
> 3. yum remove blah
> 
> ...you don't get rid of any extra stuff you got with blah, hopefully
> "yum history undo" will solve that in a better way by recording what
> happened at #1 and undoing it instead of trying to piece together what
> might have happened at #1 after the fact.

Actually, I disagree. Let's say I install bar, with dependencies cow and 
pig. Then I install foo with dependencies cow and dog.

What I would like to see happen is 'yum remove bar' removes bar and pig 
(but not cow, because foo needs it). If I then later 'yum remove foo', 
that should take care of foo, cow and dog.

'history undo' only works if nothing happens between the request to 
undo, and the action being undone (or else intervening actions have a 
net effect of nothing).

If reason worked correctly, I don't see a problem with 'yum remove' 
always removing dependencies when no longer needed.

> ¹ It's also true that saving 1 cent of disk space isn't at the top of my
> list of things to do.

Unneeded packages don't just use disk space, they also use CPU, network 
bandwidth, and cause excess disk wear due to the stream of updates for 
packages you don't need. (Plus that they can add up.)

And I've mentioned before that I hate this 'disk space is cheap' 
argument; it doesn't (yet) apply to SSD's and its rooted in the "make 
the user buy better hardware" attitude that IMO is a very bad thing.

-- 
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
-- 
Hey! Where's the witty punchline?
(with apologies to Hostess)




More information about the devel mailing list