Don't show the package counter for "Uninstalling" messages.
authorZac Medico <zmedico@gentoo.org>
Sat, 28 Mar 2009 01:39:49 +0000 (01:39 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 28 Mar 2009 01:39:49 +0000 (01:39 -0000)
svn path=/main/trunk/; revision=13240

pym/_emerge/__init__.py

index 42f608a41274d054e0b0ea57c40515a844dca5c4..8eb38291721604e6baf143c8316b85c993ce351e 100644 (file)
@@ -4035,14 +4035,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 != "/":