On Sun, 2011-03-20 at 16:40 -0700, Casey Jao wrote:
> Hi,
> 
> Suppose we want to remove package A and all of its unused dependencies.
> As written, the plugin will only remove the dependencies of A which
> would become leaves after automatically installing A. In a situation like
> 
> A <-- B --> C --> D
> 
> where "X --> Y" means "Y depends on X".
> 
> where B, C, D were dep-installed, we clearly want to remove B, C, and D
> as well. But the plugin will not do this because B won't be a leaf after
> removing A.
> 
> I have attached sample code for an alternative approach. Instead of
> removing only the dependencies which would become leaves after removing
> A, we remove all dependencies of A whose reverse dependencies, after
> removing A, would be all dep-installed. This approach would deal better
> with dependency relationships like shown above, and it should also fix
> the FIXME concerning circular dependencies.
> 
> Please let me know what you think. In particular, the plugin runs more
> slowly now because it has to examine more packages.

Remove with leaves has been integrated into the yum core codebase.

look at this patch:
ommit 862cde3a0cca43824c30c57b0af5dc330eb58fff
Author: Seth Vidal <[email protected]>
Date:   Fri Nov 5 17:39:28 2010 -0400

    add the functionality of remove_with_leaves to core
    
    - works much better than remove_with_leaves
    - better output
    - config makes more sense: clean_requirements_on_remove =
BoolOption(False)
    - uses yumdb.reason to drive it - dep-installs only
    - testing and opt required



Now - if you'd like to work on that code to test it out/make it more
consistent for long chains of deps I'd be happy to see it.

thanks!
-sv


_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to