[Yum-devel] [PATCH] Fix make check, due to rpmdb.readOnlyTS() not being in FakeRpmDb.

James Antill james at and.org
Thu Jun 24 04:43:56 UTC 2010


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

diff --git a/test/testbase.py b/test/testbase.py
index 48611d8..f91fbf1 100644
--- a/test/testbase.py
+++ b/test/testbase.py
@@ -17,6 +17,7 @@ from cli import YumBaseCli
 from yum.rpmsack import RPMDBPackageSack as _rpmdbsack
 import inspect
 from rpmUtils import arch
+from rpmUtils.transaction import initReadOnlyTransaction
 
 #############################################################
 ### Helper classes ##########################################
@@ -293,6 +294,11 @@ class FakeRpmDb(packageSack.PackageSack):
     def transactionReset(self):
         return
 
+    def readOnlyTS(self):
+        #  Should probably be able to "fake" this, so we can provide different
+        # get_running_kernel_pkgtup(). Bah.
+        return initReadOnlyTransaction("/")
+
     def getProvides(self, name, flags=None, version=(None, None, None)):
         """return dict { packages -> list of matching provides }"""
         self._checkIndexes(failure='build')
-- 
1.7.0.1



More information about the Yum-devel mailing list