[yum-git] package-cleanup.py

Tim Lauridsen timlau at linux.duke.edu
Sat Aug 16 06:56:40 UTC 2008


 package-cleanup.py |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 311c3152cee2e73c539d4754ed5bdd24da34926a
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Wed Aug 13 22:42:38 2008 +0300

    Improve default leaf regex, make it case insensitive.
    
    Signed-off-by: Ville Skyttä <ville.skytta at iki.fi>

diff --git a/package-cleanup.py b/package-cleanup.py
index 34d8665..152e873 100755
--- a/package-cleanup.py
+++ b/package-cleanup.py
@@ -371,9 +371,9 @@ def parseArgs():
     parser.add_option("--leaves", default=False, dest="leaves",action="store_true",
       help='List leaf nodes in the local RPM database')
     parser.add_option("--all", default=False, dest="all",action="store_true",
-      help='When listing leaf nodes also list leaf nodes that are not libraries')
-    parser.add_option("--leaf-regex", default="(^lib.*)|(.*lib(|s)$)",
-      help='A package name that matches this regular expression is a leaf')
+      help='When listing leaf nodes also list leaf nodes that do not match leaf-regex')
+    parser.add_option("--leaf-regex", default="(^(compat-)?lib.+|.*libs?[\d-]*$)",
+      help='A package name that matches this regular expression (case insensitively) is a leaf')
 
     parser.add_option("--exclude-devel", default=False, action="store_true",
       help='When listing leaf nodes do not list development packages')
@@ -420,7 +420,7 @@ def main():
         sys.exit(0)
     
     if (opts.leaves):
-        listLeaves(my, opts.all, re.compile(opts.leaf_regex),
+        listLeaves(my, opts.all, re.compile(opts.leaf_regex, re.IGNORECASE),
                 opts.exclude_devel, opts.exclude_bin)
         sys.exit(0)
 



More information about the Yum-cvs-commits mailing list