Florian Festi wrote:
Hi Tim!

I applied your patch to my gold branch to have a fixed base as needed for the test cases. I also cleaned up some whitespace and other quirks.

The main change is adding two test cases that really go wrong. One removes a previously installed package (by cleaning up the broken update) and the other hangs in an endless loop. I am still investigating possible fixes for those problems.

Florian


------------------------------------------------------------------------

_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel

Added some patch to fix issues with skip-broken and updates.

If we remove an update, we have to remove the cleanup txmbr of the package being updated.
There is also a patch to fix the testcases.

Tim

>From e0d67275a269ee8164cbda61c18ccb0bd462cd55 Mon Sep 17 00:00:00 2001
From: Tim Lauridsen <[EMAIL PROTECTED]>
Date: Mon, 26 Nov 2007 15:04:48 +0100
Subject: [PATCH] Fixed skip-broken on updates

---
 yum/__init__.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/yum/__init__.py b/yum/__init__.py
index 178869e..71d51ba 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -612,6 +612,12 @@ class YumBase(depsolve.Depsolve):
             for dep in txmbr.depends_on:
                 self.verbose_logger.debug("skipping dependency %s because of depsolving problems" % dep)
                 self.tsInfo.remove(dep.pkgtup)
+            # Move pkg being updated from transaction.
+            if txmbr.ts_state == 'u':
+                for upd in txmbr.updates:
+                    self.verbose_logger.debug("skipping update %s because of depsolving problems in %s" % (upd,pkg))
+                    self.tsInfo.remove(upd.pkgtup)
+                
 
 
     def runTransaction(self, cb):
-- 
1.5.3.4

>From 298f7184400c91799493b84593cec21c69ee8123 Mon Sep 17 00:00:00 2001
From: Tim Lauridsen <[EMAIL PROTECTED]>
Date: Mon, 26 Nov 2007 15:05:45 +0100
Subject: [PATCH] Fixed skip-broken on updates

---
 test/skipbroken-tests.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/test/skipbroken-tests.py b/test/skipbroken-tests.py
index c18866b..c9e2512 100644
--- a/test/skipbroken-tests.py
+++ b/test/skipbroken-tests.py
@@ -71,7 +71,7 @@ class SkipBrokenTests(DepsolveTests):
         self.tsInfo.addUpdate(po2, oldpo=po1)
         self.rpmdb.addPackage(ipo)
         
-        self.assertEquals('ok', *self.resolveCode(skip=True))
+        self.assertEquals('empty', *self.resolveCode(skip=True))
         self.assertResult([ipo, po1])
 
     def testLoop(self):
-- 
1.5.3.4

_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel

Reply via email to