[yum-git] yum/rpmsack.py

Florian Festi ffesti at linux.duke.edu
Mon May 26 08:10:55 UTC 2008


 yum/rpmsack.py |   12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

New commits:
commit 412350a6016f3f6420439948b6a2ad7a248097aa
Author: Florian Festi <ffesti at redhat.com>
Date:   Mon May 26 10:07:01 2008 +0200

    Fix code merge error in RpmSack._getPRCO
    
    Thanks to Terje Røsten for testing and reporting.

diff --git a/yum/rpmsack.py b/yum/rpmsack.py
index 5a82e27..f64409e 100644
--- a/yum/rpmsack.py
+++ b/yum/rpmsack.py
@@ -488,24 +488,22 @@ class RPMDBPackageSack(PackageSackBase):
         r_v = deptup[2][1]
 
         ts = self.readOnlyTS()
-        result = {}
-        tag = self.DEP_TABLE[prcotype][0]
+        pkgs = {}
+        tag = self.DEP_TABLE[PRCO][0]
         mi = ts.dbMatch(tag, name)
         for hdr in mi:
             po = self._makePackageObject(hdr, mi.instance())
-            result[po.pkgid] = po
+            pkgs[po.pkgid] = po
         del mi
 
         # If it's not a provides or filename, we are done
         if PRCO == 'provides' and name[0] == '/':
             fileresults = self.searchFiles(name)
             for pkg in fileresults:
-                result[pkg.pkgid] = pkg
+                pkgs[pkg.pkgid] = pkg
         
-        pkgs = result.values()
         result = {}
-
-        for po in pkgs:
+        for po in pkgs.values():
             if name[0] == '/' and r_v is None:
                 # file dep add all matches to the defSack
                 result[po] = [(name, None, (None, None, None))]



More information about the Yum-cvs-commits mailing list