[Yum-devel] [PATCH] Add testcase for old multiple arch conflicts problem.

James Antill james at and.org
Mon Jul 27 14:00:31 UTC 2009


 This was fixed a while ago, but the only testcase involves obsoletes too
(testConflictMultiplePkgs).
 Bascially if we had two conflicts with the same resolution we'd fix
the first one and then fail the second because we couldn't do anything.
---
 test/simpleupdatetests.py |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/test/simpleupdatetests.py b/test/simpleupdatetests.py
index 7307b5e..d543013 100644
--- a/test/simpleupdatetests.py
+++ b/test/simpleupdatetests.py
@@ -677,3 +677,20 @@ class SimpleUpdateTests(OperationsTests):
                                      [p11, pr12, py12])
         self.assert_(res=='ok', msg)
         self.assertResult((pi12,py12))
+
+    def testUpdateMultiArchConflict(self):
+        pi1 = FakePackage('A', '1', '1', '0', 'i386')
+        pi2 = FakePackage('B', '1', '1', '0', 'i386')
+        pi3 = FakePackage('B', '1', '1', '0', 'x86_64')
+
+        pa1 = FakePackage('A', '1', '2', '0', 'i386')
+        pa2 = FakePackage('B', '1', '2', '0', 'i386')
+        pa2.addConflicts('A', 'LE', ('0', '1', '1'))
+        pa3 = FakePackage('B', '1', '2', '0', 'x86_64')
+        pa3.addConflicts('A', 'LE', ('0', '1', '1'))
+
+        res, msg = self.runOperation(['update', 'B'],
+                                     [pi1, pi2, pi3],
+                                     [pa1, pa2, pa3])
+        self.assert_(res=='ok', msg)
+        self.assertResult((pa1, pa2, pa3))
-- 
1.6.2.5



More information about the Yum-devel mailing list