diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-11-09 20:36:29 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-11-09 20:36:29 +0000 |
commit | 995f4f42a8022a734e28ef009e0d1cb00494b2da (patch) | |
tree | 10210edee72dbc6cad301394f0c1072529f98041 | |
parent | abe0bb8950678a95f2efa2a41f805f0f06df43b0 (diff) | |
download | portage-995f4f42a8022a734e28ef009e0d1cb00494b2da.tar.gz portage-995f4f42a8022a734e28ef009e0d1cb00494b2da.tar.bz2 portage-995f4f42a8022a734e28ef009e0d1cb00494b2da.zip |
Add PROPERTIES=interactive support in depgraph.display() and the
PackageCounters class.
svn path=/main/trunk/; revision=11837
-rw-r--r-- | pym/_emerge/__init__.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index ae6161017..9791533e9 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -7415,6 +7415,22 @@ class depgraph(object): else: return colorize("PKG_NOMERGE", pkg_str) + try: + properties = flatten(use_reduce(paren_reduce( + pkg.metadata["PROPERTIES"]), uselist=pkg.use.enabled)) + except portage.exception.InvalidDependString, e: + if not pkg.installed: + show_invalid_depstring_notice(pkg, + pkg.metadata["PROPERTIES"], str(e)) + del e + return 1 + properties = [] + interactive = "interactive" in properties + if interactive and pkg.operation == "merge": + addl = colorize("WARN", "I") + addl[1:] + if ordered: + counters.interactive += 1 + if x[1]!="/": if myoldbest: myoldbest +=" " @@ -8169,6 +8185,7 @@ class PackageCounters(object): self.totalsize = 0 self.restrict_fetch = 0 self.restrict_fetch_satisfied = 0 + self.interactive = 0 def __str__(self): total_installs = self.upgrades + self.downgrades + self.newslot + self.new + self.reinst @@ -8201,6 +8218,9 @@ class PackageCounters(object): details.append("%s uninstall" % self.uninst) if self.uninst > 1: details[-1] += "s" + if self.interactive > 0: + details.append("%s %s" % (self.interactive, + colorize("WARN", "interactive"))) myoutput.append(", ".join(details)) if total_installs != 0: myoutput.append(")") |