[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] yum: make transaction results available to plugins



Put the result of the transaction in the TranactionData object so that
it is available to plugins.

--- yum-3.2.19/yum/transactioninfo.py	2008-08-12 08:54:00.000000000 -0500
+++ yum-3.2.19.new/yum/transactioninfo.py	2008-08-31 10:00:22.000000000 -0500
@@ -63,7 +63,8 @@
         self.depremoved = []
         self.depinstalled = []
         self.depupdated = []
-
+        self.transaction_result = None
+
     def __len__(self):
         return len(self.pkgdict)

@@ -459,6 +460,12 @@
         result.update(self.getNewRequires(name, flag, version))
         return result

+    def getTransactionResult(self):
+        return self.transaction_result
+
+    def setTransactionResult(self, result):
+        self.transaction_result = result
+
 class ConditionalTransactionData(TransactionData):
     """A transaction data implementing conditional package addition"""
     def __init__(self):
--- yum-3.2.19/yum/__init__.py	2008-08-26 14:37:17.000000000 -0500
+++ yum-3.2.19.new/yum/__init__.py	2008-08-31 09:59:40.000000000 -0500
@@ -799,6 +799,8 @@
         else:
             raise Errors.YumBaseError, errors

+        self.tsInfo.setTransactionResult(resultobject)
+
         if not self.conf.keepcache:
             self.cleanUsedHeadersPackages()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]