Add (x of y ) package counter in the "Installing" message, similar to the
authorZac Medico <zmedico@gentoo.org>
Sat, 28 Mar 2009 01:17:57 +0000 (01:17 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 28 Mar 2009 01:17:57 +0000 (01:17 -0000)
counter show in the "Emerging" message. Thanks to Ned Ludd <solar@g.o> for
the suggestion.

svn path=/main/trunk/; revision=13239

pym/_emerge/__init__.py

index 04695cf8ae110c9f4fbe52ceada9e12c697f5b8f..42f608a41274d054e0b0ea57c40515a844dca5c4 100644 (file)
@@ -4039,7 +4039,11 @@ class PackageMerge(AsynchronousTask):
                        action_desc = "Installing"
                        preposition = "to"
 
-               msg = "%s %s" % (action_desc, colorize("GOOD", pkg.cpv))
+               msg = "%s (%s of %s) %s" % \
+                       (action_desc,
+                       colorize("MERGE_LIST_PROGRESS", str(pkg_count.curval)),
+                       colorize("MERGE_LIST_PROGRESS", str(pkg_count.maxval)),
+                       colorize("GOOD", pkg.cpv))
 
                if pkg.root != "/":
                        msg += " %s %s" % (preposition, pkg.root)