From: Zac Medico Date: Fri, 25 Jul 2008 22:48:57 +0000 (-0000) Subject: Suppress "for /" and "to /" in status messages when ROOT=/. Thanks to X-Git-Tag: v2.2_rc4~36 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=acf380c075869f82a7292c76d20f3b1327e7f453;p=portage.git Suppress "for /" and "to /" in status messages when ROOT=/. Thanks to Thargor for the suggestion. svn path=/main/trunk/; revision=11191 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 649ce2c02..9c82a2b7a 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -3379,14 +3379,17 @@ class MergeListItem(CompositeTask): if build_opts.fetchonly: action_desc = "Fetching" - if not build_opts.pretend: + 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)) - self.statusMessage("%s (%s of %s) %s %s %s" % \ - (action_desc, - colorize("MERGE_LIST_PROGRESS", str(pkg_count.curval)), - colorize("MERGE_LIST_PROGRESS", str(pkg_count.maxval)), - colorize("GOOD", pkg.cpv), preposition, pkg.root)) + if pkg.root != "/": + msg += " %s %s" % (preposition, pkg.root) + if not build_opts.pretend: + self.statusMessage(msg) logger.log(" >>> emerge (%s of %s) %s to %s" % \ (pkg_count.curval, pkg_count.maxval, pkg.cpv, pkg.root)) @@ -3487,12 +3490,15 @@ class PackageMerge(AsynchronousTask): action_desc = "Installing" preposition = "to" + msg = "%s %s" % (action_desc, colorize("GOOD", pkg.cpv)) + + if pkg.root != "/": + msg += " %s %s" % (preposition, pkg.root) + if not self.merge.build_opts.fetchonly and \ not self.merge.build_opts.pretend and \ not self.merge.build_opts.buildpkgonly: - self.merge.statusMessage("%s %s %s %s" % \ - (action_desc, colorize("GOOD", pkg.cpv), - preposition, pkg.root)) + self.merge.statusMessage(msg) self.returncode = self.merge.merge() self.wait()