[yum-cvs] yum/yum __init__.py,1.99,1.100

Seth Vidal skvidal at login.linux.duke.edu
Thu Mar 24 08:14:16 UTC 2005


Update of /home/groups/yum/cvs/yum/yum
In directory login:/tmp/cvs-serv31481/yum

Modified Files:
	__init__.py 
Log Message:

move the plugins call outside of cli.py and into the yum module.



Index: __init__.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/__init__.py,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -r1.99 -r1.100
--- __init__.py	21 Mar 2005 12:37:13 -0000	1.99
+++ __init__.py	24 Mar 2005 08:14:14 -0000	1.100
@@ -291,6 +291,23 @@
         (rescode, restring) = self.resolveDeps()
         return rescode, restring
 
+    def runTransaction(self, cb):
+        """takes an rpm callback object, performs the transaction"""
+
+        if self.plugins.run('pretrans') != 0:
+            return
+
+        errors = self.ts.run(cb.callback, '')
+        if errors:
+            errstring = 'Error in Transaction: '
+            for descr in errors:
+                errstring += '  %s\n' % str(descr)
+            
+            raise yum.Errors.YumBaseError, errstring
+
+        if self.plugins.run('posttrans') != 0:
+            return
+        
     def excludePackages(self, repo=None):
         """removes packages from packageSacks based on global exclude lists,
            command line excludes and per-repository excludes, takes optional 




More information about the Yum-cvs-commits mailing list