[yum-commits] Branch 'yum-3_2_X' - 2 commits - test/skipbroken-tests.py yum/__init__.py
Tim Lauridsen
timlau at osuosl.org
Wed Jan 12 17:22:45 UTC 2011
test/skipbroken-tests.py | 32 ++++++++++++++++++++++++++++++++
yum/__init__.py | 2 +-
2 files changed, 33 insertions(+), 1 deletion(-)
New commits:
commit 1cd2fd5740c85a9199f5db07601d37cc035c21e6
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date: Wed Jan 12 17:55:16 2011 +0100
use sorted(set()) instead of set(sorted())
diff --git a/test/skipbroken-tests.py b/test/skipbroken-tests.py
index 7d2aa9c..4e6b2c8 100644
--- a/test/skipbroken-tests.py
+++ b/test/skipbroken-tests.py
@@ -669,7 +669,7 @@ class SkipBrokenTests(DepsolveTests):
self.tsInfo.addUpdate(u7, oldpo=i7)
self.assertEquals('ok', *self.resolveCode(skip=True))
# uncomment this line and the test will fail and you can see the output
- #self.assertResult([i1])
+ self.assertResult([i1])
diff --git a/yum/__init__.py b/yum/__init__.py
index d8c5c3f..5d3309d 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -1289,7 +1289,7 @@ class YumBase(depsolve.Depsolve):
for txmbr in sorted(self.tsInfo):
msg = "SKIPBROKEN: %-11s : %s " % (state[txmbr.output_state],txmbr.po)
self.verbose_logger.log(logginglevels.DEBUG_2, msg)
- for po,rel in set(sorted(txmbr.relatedto)):
+ for po,rel in sorted(set(txmbr.relatedto)):
msg = "SKIPBROKEN: %s : %s" % (rel,po)
self.verbose_logger.log(logginglevels.DEBUG_2, msg)
self.verbose_logger.log(logginglevels.DEBUG_2,"SKIPBROKEN:%s" % (60 * "="))
commit 24900b365bdfd4af8ae1761e33f8110d8233d070
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date: Wed Jan 12 16:52:10 2011 +0100
Remove redundant dependson lines in skip-broken debug output.
Now we get very long skip-broken transaction listings with -d9
SKIPBROKEN: update : ocaml-runtime-3.12.0-3.fc15.x86_64
SKIPBROKEN: dependson : coccinelle-0.2.5-0.rc1.2.fc15.x86_64
SKIPBROKEN: dependson : coccinelle-0.2.5-0.rc1.2.fc15.x86_64
SKIPBROKEN: dependson : coccinelle-0.2.5-0.rc1.2.fc15.x86_64
SKIPBROKEN: dependson : coccinelle-0.2.5-0.rc1.2.fc15.x86_64
SKIPBROKEN: dependson : coccinelle-0.2.5-0.rc1.2.fc15.x86_64
SKIPBROKEN: dependson : coccinelle-0.2.5-0.rc1.2.fc15.x86_64
SKIPBROKEN: dependson : coccinelle-0.2.5-0.rc1.2.fc15.x86_64
SKIPBROKEN: dependson : coccinelle-0.2.5-0.rc1.2.fc15.x86_64
SKIPBROKEN: dependson : coccinelle-0.2.5-0.rc1.2.fc15.x86_64
SKIPBROKEN: dependson : coccinelle-0.2.5-0.rc1.2.fc15.x86_64
after this patch we will only get
SKIPBROKEN: update : ocaml-runtime-3.12.0-3.fc15.x86_64
SKIPBROKEN: dependson : coccinelle-0.2.5-0.rc1.2.fc15.x86_64
diff --git a/test/skipbroken-tests.py b/test/skipbroken-tests.py
index 9f09e87..7d2aa9c 100644
--- a/test/skipbroken-tests.py
+++ b/test/skipbroken-tests.py
@@ -638,6 +638,38 @@ class SkipBrokenTests(DepsolveTests):
self.tsInfo.addUpdate(u1, oldpo=i1)
self.assertEquals('empty', *self.resolveCode(skip=True))
self.assertResult([i1,i2])
+
+ def testTransactionOutput(self):
+ '''
+ Test that skip-broken transaction dump output dont show the
+ dependon: xxx once.
+ '''
+ i1 = self.repoPackage('bar1', '1')
+ i1.addRequires('foo1', 'EQ', ('0', '1', '0'))
+ i1.addRequires('foo2', 'EQ', ('0', '1', '0'))
+ i1.addRequires('foo3', 'EQ', ('0', '1', '0'))
+ i1.addRequires('foo4', 'EQ', ('0', '1', '0'))
+ i1.addRequires('foo5', 'EQ', ('0', '1', '0'))
+ i1.addRequires('foo6', 'EQ', ('0', '1', '0'))
+ i2 = self.repoPackage('fooA', '1')
+ i2.addProvides('foo1', 'EQ', ('0', '1', '0'))
+ i3 = self.repoPackage('fooB', '1')
+ i3.addProvides('foo2', 'EQ', ('0', '1', '0'))
+ i4 = self.repoPackage('fooC', '1')
+ i4.addProvides('foo3', 'EQ', ('0', '1', '0'))
+ i5 = self.repoPackage('fooD', '1')
+ i5.addProvides('foo4', 'EQ', ('0', '1', '0'))
+ i6 = self.repoPackage('fooE', '1')
+ i6.addProvides('foo5', 'EQ', ('0', '1', '0'))
+ i7 = self.instPackage('fooF', '1')
+ i7.addProvides('foo6', 'EQ', ('0', '1', '0'))
+ u7 = self.instPackage('fooF', '2')
+ u7.addProvides('foo6', 'EQ', ('0', '2', '0'))
+ self.tsInfo.addInstall(i1)
+ self.tsInfo.addUpdate(u7, oldpo=i7)
+ self.assertEquals('ok', *self.resolveCode(skip=True))
+ # uncomment this line and the test will fail and you can see the output
+ #self.assertResult([i1])
diff --git a/yum/__init__.py b/yum/__init__.py
index 39ed0db..d8c5c3f 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -1289,7 +1289,7 @@ class YumBase(depsolve.Depsolve):
for txmbr in sorted(self.tsInfo):
msg = "SKIPBROKEN: %-11s : %s " % (state[txmbr.output_state],txmbr.po)
self.verbose_logger.log(logginglevels.DEBUG_2, msg)
- for po,rel in sorted(txmbr.relatedto):
+ for po,rel in set(sorted(txmbr.relatedto)):
msg = "SKIPBROKEN: %s : %s" % (rel,po)
self.verbose_logger.log(logginglevels.DEBUG_2, msg)
self.verbose_logger.log(logginglevels.DEBUG_2,"SKIPBROKEN:%s" % (60 * "="))
More information about the Yum-commits
mailing list