Dependency loops considered harmful?

Seth Vidal skvidal at fedoraproject.org
Thu Sep 4 23:35:47 UTC 2008


On Thu, 2008-09-04 at 14:42 -0700, Toshio Kuratomi wrote:
> Seth Vidal wrote:
> > On Thu, 2008-09-04 at 13:07 -0700, Toshio Kuratomi wrote:
> >> Seth Vidal wrote:
> >>> Okay this is obviously just Proof code so take it as read - but grab
> >>> this script:
> >>>
> >>> http://skvidal.fedorapeople.org/misc/remove-recurse.py
> >>>
> >>> and run it with one arg being the pkg you wish to remove. It will print
> >>> out what it would end up doing if it was removed.
> >>>
> >>> for example:
> >>>
> >>> # python remove-recurse.py easytag
> >>> remove easytag
> >>> removing id3lib-3.8.3-20.fc9.i386 b/c it is not required by anything
> >>> else
> >>> removing libmp4v2-1.5.0.1-6.fc9.i386 b/c it is not required by anything
> >>> else
> >>> libmp4v2.i386 0-1.5.0.1-6.fc9 - e
> >>> id3lib.i386 0-3.8.3-20.fc9 - e
> >>> easytag.i386 0-2.1-5.fc9 - e
> >>>
> >>>
> >>>
> >>> It doesn't actually change anything, just prints out what would happen.
> >>> then tell me which (and I'm sure there  are many) cases it doesn't
> >>> properly address.
> >>> -sv
> >>>
> >>>
> >> [badger at Clingman tmp]$ sudo ./remove-recurse.py yum
> >> [...]
> >> removing pygpgme-0.1-8.fc9.i386 b/c it is not required by anything else
> >> removing python-iniparse-0.2.3-3.fc9.noarch b/c it is not required by
> >> anything else
> >>
> >> As it turns out, I personally need both of these deps.  I have a script
> >> in ~/bin/ that uses pygpgme.  I also am working on fas in a local
> >> checkout which requires pygpgme.  And I'm evaluating python-iniparse and
> >> python-configobj to see which one I'm going to be using for some fedora
> >> infrastructure scripts.
> >>
> >> So -- I like having a script that can remove things recursively.  Even
> >> better if I could do:
> >>   sudo remove-recurse.py yum --exclude pygpgme
> >>
> >> I just wouldn't want this kind of thing to be automatic or to be the
> >> default when I do "yum remove"
> >>
> > 
> > I mostly agree. I sorta think that _maybe_ your case is becoming more of
> > the edge case and a lot more folks want to remove all the things that
> > just got dragged in when they ran: yum install this_really_cool_thing
> > 
> > So, if there were an option to let you disable leaf removal would that
> > work out?
> > 
> Depends.  I'd much rather have::
>   yum remove (-r|-R|--recursive) this_really_cool_thing
> 
> than::
>   yum remove --no-recursive this_really_cool_thing
> 
> But maybe that's just the positive me.
> 
> If it goes in /etc/yum.conf then either one could be the default.  A
> setting in a config file can be scripted in a kickstart, deployed by
> puppet, or set by an individual user once and then forgotten.
> 

nod. The other option, given the code I just put in a separate script,
is to make it a plugin to handle the above.

It wouldn't be hard to do and then if you wanted leaf dep removal you
could install/enable the plugin.

-sv





More information about the fedora-devel-list mailing list