[yum-git] test/depsolvetests.py yum/depsolve.py

James Antill james at linux.duke.edu
Thu Mar 13 22:38:13 UTC 2008


 test/depsolvetests.py |    6 +-----
 yum/depsolve.py       |   11 +++++++----
 2 files changed, 8 insertions(+), 9 deletions(-)

New commits:
commit db8cb8bc4c17213d1fba88e09d569c57689744ba
Author: James Antill <james at and.org>
Date:   Thu Mar 13 18:36:00 2008 -0400

     With lots of discussion/consultation with Seth
    
     Fix multilib. edge case.
     Fixes the testcase.
     Also fixes the case we've seen IRL where
       pkgA.32 deps. on libfoo.so.2
       pkgB-1.64 provides libfoo.so.1()(64bit)
       pkgB-2.64 provides libfoo.so.2()(64bit)
       pkgB-2.32 provides libfoo.so.2
    ...and we need to install pkgB-2.32 and update to pkgB-2.64

diff --git a/test/depsolvetests.py b/test/depsolvetests.py
index 83ceebf..9589421 100644
--- a/test/depsolvetests.py
+++ b/test/depsolvetests.py
@@ -555,11 +555,7 @@ class DepsolveTests(DepsolveTests):
         self.rpmdb.addPackage(xpo1)
 
         self.assertEquals('ok', *self.resolveCode())
-        # FIXME: This should be:
-        # self.assertResult((po, xpo2, ipo2))
-        # ...but we process the 32bit dep. first, which brings in the 64 variant
-        # which, because something was added, makes us think we worked.
-        self.assertResult((po, xpo2))
+        self.assertResult((po, xpo2, ipo2))
 
     def testFakeMultilibReqsUpdate1b(self):
         (po, xpo1, xpo2, ipo1, ipo2) = self._setup_FakeMultilibReqs()
diff --git a/yum/depsolve.py b/yum/depsolve.py
index 3957d68..21f3571 100644
--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -495,10 +495,13 @@ class Depsolve(object):
         # try updating the already install pkgs
         length = len(self.tsInfo)
         for pkg in provSack.returnNewestByName():
-            self.update(requiringPo=requiringPo, name=pkg.name, epoch=pkg.epoch, version=pkg.version, rel=pkg.rel)
-            if len(self.tsInfo) != length:
-                checkdeps = True
-                return checkdeps, missingdep
+            results = self.update(requiringPo=requiringPo, name=pkg.name,
+                                  epoch=pkg.epoch, version=pkg.version,
+                                  rel=pkg.rel)
+            for txmbr in results:
+                if pkg == txmbr.po:
+                    checkdeps = True
+                    return checkdeps, missingdep
 
         # find out which arch of the ones we can choose from is closest
         # to the arch of the requesting pkg



More information about the Yum-cvs-commits mailing list