[yum-commits] Branch 'yum-3_2_X' - 2 commits - test/simpleupdatetests.py yum/depsolve.py
James Antill
james at osuosl.org
Mon Oct 27 19:45:43 UTC 2008
test/simpleupdatetests.py | 12 ++++++++++++
yum/depsolve.py | 2 ++
2 files changed, 14 insertions(+)
New commits:
commit 46ea40a4d3df479b367f52002d6dae58b222f6d7
Author: James Antill <james at and.org>
Date: Mon Oct 27 15:45:36 2008 -0400
Add the pkgSack to the transaction, if we have a remove followed by an install
diff --git a/yum/depsolve.py b/yum/depsolve.py
index 25eb0e6..749a280 100644
--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -114,6 +114,8 @@ class Depsolve(object):
self._tsInfo.install_method = self.install
self._tsInfo.update_method = self.update
self._tsInfo.remove_method = self.remove
+ elif not remove_only and self._tsInfo.pkgSack is None:
+ self._tsInfo.setDatabases(self.rpmdb, self.pkgSack)
return self._tsInfo
def _setTsInfo(self, value):
commit 5aa9470b325a7829af4d57d557ecb814da31c070
Author: James Antill <james at and.org>
Date: Mon Oct 27 14:16:21 2008 -0400
Test update which requires specific version, but not a later one
diff --git a/test/simpleupdatetests.py b/test/simpleupdatetests.py
index 9ee7ce0..4efe382 100644
--- a/test/simpleupdatetests.py
+++ b/test/simpleupdatetests.py
@@ -348,3 +348,15 @@ class SimpleUpdateTests(OperationsTests):
[p.required_updated, p.update_i386, p.update_x86_64])
self.assert_(res=='ok', msg)
self.assertResult((p.required_updated, p.update_i386, p.update_x86_64))
+
+ def testUpdateNotLatestDep(self):
+ foo11 = FakePackage('foo', '1', '1', '0', 'i386')
+ foo11.addRequires('bar', 'EQ', ('0', '1', '1'))
+ foo12 = FakePackage('foo', '1', '2', '0', 'i386')
+ foo12.addRequires('bar', 'EQ', ('0', '1', '2'))
+ bar11 = FakePackage('bar', '1', '1', '0', 'i386')
+ bar12 = FakePackage('bar', '1', '2', '0', 'i386')
+ bar21 = FakePackage('bar', '2', '1', '0', 'i386')
+ res, msg = self.runOperation(['install', 'foo'], [foo11, bar11], [foo12, bar12, bar21])
+ self.assert_(res=='ok', msg)
+ self.assertResult((foo12, bar12))
More information about the Yum-commits
mailing list