[yum-commits] plugins/remove-with-leaves

James Antill james at osuosl.org
Mon Sep 20 13:36:45 UTC 2010


 plugins/remove-with-leaves/remove-with-leaves.py |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 90ea69cc7589160735fc67f341db210403bc7f6f
Author: Casey Jao <cjao at ugcs.caltech.edu>
Date:   Mon Sep 20 09:35:40 2010 -0400

    Remove-with-leaves plugin: check install reason

diff --git a/plugins/remove-with-leaves/remove-with-leaves.py b/plugins/remove-with-leaves/remove-with-leaves.py
index a808aef..db6d489 100644
--- a/plugins/remove-with-leaves/remove-with-leaves.py
+++ b/plugins/remove-with-leaves/remove-with-leaves.py
@@ -88,6 +88,11 @@ def postresolve_hook(conduit):
                             continue # skip ones already marked for remove, kinda pointless
                         if pkg.name in ignore_list: # there are some pkgs which are NEVER going to be leafremovals
                             continue
+
+                        # Skip manually installed packages.
+                        if pkg.yumdb_info.get('reason') == 'user':
+                            continue
+
                         non_removed_requires = []
                         for req_pkgtup in _requires_this_package(rpmdb,pkg):
                             pkgtups = [ txmbr.po.pkgtup for txmbr in tsInfo.getMembersWithState(output_states=[TS_ERASE]) ]


More information about the Yum-commits mailing list