[yum-commits] Branch 'yum-3_2_X' - yum/__init__.py

James Antill james at osuosl.org
Sat Oct 18 00:36:06 UTC 2008


 yum/__init__.py |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit fc81c8e39c271615092e0c5d3acad7ecc1d196e5
Author: James Antill <james at and.org>
Date:   Fri Oct 17 20:34:57 2008 -0400

    Allow yum-complete-transaction to turn off the unfinished transactions check

diff --git a/yum/__init__.py b/yum/__init__.py
index 50351f2..7aafb84 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -632,10 +632,11 @@ class YumBase(depsolve.Depsolve):
             self.verbose_logger.log(logginglevels.INFO_2, msg)
             self.repos.populateSack(mdtype='filelists')
            
-    def buildTransaction(self):
+    def buildTransaction(self, unfinished_transactions_check=True):
         """go through the packages in the transaction set, find them in the
            packageSack or rpmdb, and pack up the ts accordingly"""
-        if misc.find_unfinished_transactions(yumlibpath=self.conf.persistdir):
+        if (unfinished_transactions_check and
+            misc.find_unfinished_transactions(yumlibpath=self.conf.persistdir)):
             msg = _('There are unfinished transactions remaining. You might ' \
                     'consider running yum-complete-transaction first to finish them.' )
             self.logger.critical(msg)


More information about the Yum-commits mailing list