[yum-cvs] 2 commits - yum/__init__.py

Seth Vidal skvidal at linux.duke.edu
Tue Dec 11 07:06:00 UTC 2007


 yum/__init__.py |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

New commits:
commit c6957be573782a8862473ec816cecc437473f78a
Merge: d337a08... 707f84e...
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Tue Dec 11 02:04:56 2007 -0500

    Merge branch 'master' of ssh://login.linux.duke.edu/home/groups/yum/git/yum
    
    * 'master' of ssh://login.linux.duke.edu/home/groups/yum/git/yum:
       Compat. fix for -1 seconds usage, document that behaviour.
      Change default metadata_expire to 1.5h, for better UI with yum-updatesd running
      Add SecondsOption() class, for user friendlier config. files

commit d337a08e7d7c8ae70c53492d22dd2dfc87fa78b4
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Tue Dec 11 02:04:47 2007 -0500

    add pattern= support to kwargs for remove() method in YumBase

diff --git a/yum/__init__.py b/yum/__init__.py
index 92c8d26..a003489 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -2086,13 +2086,18 @@ class YumBase(depsolve.Depsolve):
         pkgs = []
         
         if po:
-            pkgs = [po]
+            pkgs = [po]  
         else:
-            nevra_dict = self._nevra_kwarg_parse(kwargs)
+            if kwargs.has_key('pattern'):
+                (e,m,u) = self.rpmdb.matchPackageNames([kwargs['pattern']])
+                pkgs.extend(e)
+                pkgs.extend(m)
+            else:    
+                nevra_dict = self._nevra_kwarg_parse(kwargs)
 
-            pkgs = self.rpmdb.searchNevra(name=nevra_dict['name'], 
-                        epoch=nevra_dict['epoch'], arch=nevra_dict['arch'], 
-                        ver=nevra_dict['version'], rel=nevra_dict['release'])
+                pkgs = self.rpmdb.searchNevra(name=nevra_dict['name'], 
+                            epoch=nevra_dict['epoch'], arch=nevra_dict['arch'], 
+                            ver=nevra_dict['version'], rel=nevra_dict['release'])
 
         if len(pkgs) == 0: # should this even be happening?
             self.logger.warning("No package matched to remove")



More information about the Yum-cvs-commits mailing list