Hi!

A small patch to move to the new interface. Don't think it has much performance impact and it is probably not that necessary but its a small clean up that shows why the new API is the right thing (tm).

Florian
Index: yum/__init__.py
===================================================================
RCS file: /cvsroot/yum/cvs/yum/yum/__init__.py,v
retrieving revision 1.332
diff -u -r1.332 __init__.py
--- yum/__init__.py	10 Jun 2007 16:33:17 -0000	1.332
+++ yum/__init__.py	14 Jun 2007 16:45:14 -0000
@@ -1639,7 +1639,6 @@
         """Pass in a generic [build]require string and this function will 
            pass back the installed packages it finds providing that dep."""
         
-        results = []
         # parse the string out
         #  either it is 'dep (some operator) e:v-r'
         #  or /file/dep
@@ -1658,14 +1657,8 @@
                 if not SYMBOLFLAGS.has_key(flagsymbol):
                     raise Errors.YumBaseError, 'Invalid version flag'
                 depflags = SYMBOLFLAGS[flagsymbol]
-                
-        pkglist = self.rpmdb.whatProvides(depname, depflags, depver)
-        
-        for pkgtup in pkglist:
-            results.append(self.getInstalledPackageObject(pkgtup))
         
-        return results
-
+        return self.rpmdb.getProvides(depname, depflags, depver) 
 
     def _bestPackageFromList(self, pkglist):
         """take list of package objects and return the best package object.
_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel

Reply via email to