[yum-commits] Branch 'yum-3_2_X' - 2 commits - test/testbase.py yum/__init__.py

Tim Lauridsen timlau at osuosl.org
Sun Nov 9 12:50:24 UTC 2008


 test/testbase.py |    1 +
 yum/__init__.py  |   10 +++++++---
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 8b4f9781f0b18978d04fcc467b276478e6e7e5e3
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date:   Sun Nov 9 13:50:04 2008 +0100

    handle obsoleted txmbr without obsoleting txmbr in skip-broken

diff --git a/yum/__init__.py b/yum/__init__.py
index 316d11e..94e732d 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -768,14 +768,18 @@ class YumBase(depsolve.Depsolve):
         then the TS_OBSOLETED can get removed from the transaction
         so we must make sure that they, exist and else create them
         """
-        added = set()
         for txmbr in self.tsInfo:
             for pkg in txmbr.obsoletes:
                 if not self.tsInfo.exists(pkg.pkgtup):
                     obs = self.tsInfo.addObsoleted(pkg,txmbr.po)
                     self.verbose_logger.debug('SKIPBROKEN: Added missing obsoleted %s (%s)' % (pkg,txmbr.po) )
-                    added.add(obs)
-        return added
+            for pkg in txmbr.obsoleted_by:
+                # check if the obsoleting txmbr is in the transaction
+                # else remove the obsoleted txmbr
+                # it clean out some really wierd cases
+                if not self.tsInfo.exists(pkg.pkgtup):
+                    self.verbose_logger.debug('SKIPBROKEN: Remove extra obsoleted %s (%s)' % (txmbr.po,pkg) )
+                    self.tsInfo.remove(txmbr.po.pkgtup)
                     
 
     def _skipFromTransaction(self,po):
commit c6643eb7aed4f5dc60c6350a7005f9e7fcd374ab
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date:   Sun Nov 9 13:35:36 2008 +0100

    add tsInfo debug messages to output in broken tests

diff --git a/test/testbase.py b/test/testbase.py
index 0beffc6..bed2267 100644
--- a/test/testbase.py
+++ b/test/testbase.py
@@ -267,6 +267,7 @@ class DepsolveTests(_DepsolveTestsBase):
         """ Called at the start of each test. """
         _DepsolveTestsBase.setUp(self)
         self.tsInfo = transactioninfo.TransactionData()
+        self.tsInfo.debug = 1
         self.rpmdb  = FakeRpmDb()
         self.xsack  = packageSack.PackageSack()
         self.repo   = FakeRepo("installed")


More information about the Yum-commits mailing list