Don't show the package counter for "Uninstalling" messages. (trunk r13240)
authorZac Medico <zmedico@gentoo.org>
Thu, 30 Apr 2009 06:45:05 +0000 (06:45 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 30 Apr 2009 06:45:05 +0000 (06:45 -0000)
svn path=/main/branches/2.1.6/; revision=13421

pym/_emerge/__init__.py

index ebd64f105c8f1a7e361359531dcd42221b0c9443..3b04c3dcff5917af2b139a8a098e2c08a41341a0 100644 (file)
@@ -4016,14 +4016,17 @@ class PackageMerge(AsynchronousTask):
                if pkg.installed:
                        action_desc = "Uninstalling"
                        preposition = "from"
+                       counter_str = ""
                else:
                        action_desc = "Installing"
                        preposition = "to"
+                       counter_str = "(%s of %s) " % \
+                               (colorize("MERGE_LIST_PROGRESS", str(pkg_count.curval)),
+                               colorize("MERGE_LIST_PROGRESS", str(pkg_count.maxval)))
 
-               msg = "%s (%s of %s) %s" % \
+               msg = "%s %s%s" % \
                        (action_desc,
-                       colorize("MERGE_LIST_PROGRESS", str(pkg_count.curval)),
-                       colorize("MERGE_LIST_PROGRESS", str(pkg_count.maxval)),
+                       counter_str,
                        colorize("GOOD", pkg.cpv))
 
                if pkg.root != "/":