From: "Thomas Sachau" <tommy@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:multilib commit in: pym/_emerge/resolver/
Date: Sun, 6 Feb 2011 13:10:02 +0000 (UTC) [thread overview]
Message-ID: <30e1ece51561f2012d389350ffd8164f90ad636c.tommy@gentoo> (raw)
commit: 30e1ece51561f2012d389350ffd8164f90ad636c
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 2 21:56:30 2011 +0000
Commit: Thomas Sachau <tommy <AT> gentoo <DOT> org>
CommitDate: Wed Feb 2 21:56:30 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=30e1ece5
Display: simplify alignment for mask status
---
pym/_emerge/resolver/output.py | 26 +++++++++++---------------
1 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/pym/_emerge/resolver/output.py b/pym/_emerge/resolver/output.py
index 46e2280..93a2b5d 100644
--- a/pym/_emerge/resolver/output.py
+++ b/pym/_emerge/resolver/output.py
@@ -85,9 +85,7 @@ class Display(object):
self.blocker_style = "PKG_BLOCKER"
addl = "%s %s " % (colorize(self.blocker_style, "B"),
fetch_symbol)
- if self.conf.verbosity == 3:
- # add column for mask status
- addl += " "
+ addl += self.empty_space_in_brackets()
self.resolved = dep_expand(
str(pkg.atom).lstrip("!"), mydb=self.vardb,
settings=self.pkgsettings
@@ -181,6 +179,13 @@ class Display(object):
return mask_str
+ def empty_space_in_brackets(self):
+ space = ""
+ if self.conf.verbosity == 3:
+ # add column for mask status
+ space += " "
+ return space
+
def map_to_use_expand(self, myvals, forced_flags=False,
remove_hidden=True):
"""Map use expand variables
@@ -437,10 +442,7 @@ class Display(object):
self.verboseadd = None
else:
if not pkg_info.merge:
- addl = ""
- if self.conf.verbosity == 3:
- # add column for mask status
- addl += " "
+ addl = self.empty_space_in_brackets()
myprint = "[%s%s] %s%s" % \
(self.pkgprint(pkg_info.operation.ljust(13), pkg_info),
addl, self.indent, self.pkgprint(pkg.cp, pkg_info))
@@ -466,10 +468,7 @@ class Display(object):
@rtype the updated addl
"""
if not pkg_info.merge:
- addl = ""
- if self.conf.verbosity == 3:
- # add column for mask status
- addl += " "
+ addl = self.empty_space_in_brackets()
myprint = "[%s%s] %s%s %s" % \
(self.pkgprint(pkg_info.operation.ljust(13),
pkg_info), addl,
@@ -827,10 +826,7 @@ class Display(object):
addl, pkg_info, pkg)
else:
if not pkg_info.merge:
- addl = ""
- if self.conf.verbosity == 3:
- # add column for mask status
- addl += " "
+ addl = self.empty_space_in_brackets()
myprint = "[%s%s] " % (
self.pkgprint(pkg_info.operation.ljust(13),
pkg_info), addl,
next reply other threads:[~2011-02-06 13:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-06 13:10 Thomas Sachau [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-02-06 13:09 [gentoo-commits] proj/portage:multilib commit in: pym/_emerge/resolver/ Thomas Sachau
2011-02-06 13:09 Thomas Sachau
2011-02-06 13:09 Thomas Sachau
2011-02-06 13:09 Thomas Sachau
2011-02-06 13:09 Thomas Sachau
2011-02-06 13:09 Thomas Sachau
2011-02-06 13:09 Thomas Sachau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=30e1ece51561f2012d389350ffd8164f90ad636c.tommy@gentoo \
--to=tommy@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox