[yum-cvs] cli.py

Seth Vidal skvidal at linux.duke.edu
Fri Dec 7 04:37:05 UTC 2007


 cli.py |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 47d8548b6a851a6a283f4d635b954692e6e0875d
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Thu Dec 6 23:36:45 2007 -0500

    fix for rh bug 252011
    right before we run the transaction and confirm with the user, just for grins
    check to make sure the transaction is not empty.

diff --git a/cli.py b/cli.py
index a87048b..9207b4b 100644
--- a/cli.py
+++ b/cli.py
@@ -295,6 +295,11 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
     def doTransaction(self):
         """takes care of package downloading, checking, user confirmation and actually
            RUNNING the transaction"""
+    
+        # just make sure there's not, well, nothing to do
+        if len(self.tsInfo) == 0:
+                self.verbose_logger.info('Trying to run the transaction but nothing to do. Exiting.')
+                return 1
 
         # output what will be done:
         self.verbose_logger.log(yum.logginglevels.INFO_1,



More information about the Yum-cvs-commits mailing list