summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-11-14 05:57:35 +0000
committerZac Medico <zmedico@gentoo.org>2006-11-14 05:57:35 +0000
commit8e231c7a1b41c16761bc4439980d2363703df3bc (patch)
tree6990543b9c6a281bbf51b02a0b4d5dfa0d36e866
parent8bce06c99d399c288ae2d12ed4722e34113aa7a8 (diff)
downloadportage-8e231c7a1b41c16761bc4439980d2363703df3bc.tar.gz
portage-8e231c7a1b41c16761bc4439980d2363703df3bc.tar.bz2
portage-8e231c7a1b41c16761bc4439980d2363703df3bc.zip
For bug #154897, show a summary of fetch restrictions if there are any.
svn path=/main/trunk/; revision=5038
-rwxr-xr-xbin/emerge12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/emerge b/bin/emerge
index 3a05d0378..a9f4d3f8d 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -1922,9 +1922,11 @@ class depgraph:
"fetch" in portdb.aux_get(
x[2], ["RESTRICT"])[0].split():
fetch = red("F")
+ counters.restrict_fetch += 1
if portdb.fetch_check(
pkg_key, self.useFlags[myroot][pkg_key]):
fetch = green("f")
+ counters.restrict_fetch_satisfied += 1
#we need to use "--emptrytree" testing here rather than "empty" param testing because "empty"
#param is used for -u, where you still *do* want to see when something is being upgraded.
@@ -2248,6 +2250,8 @@ class PackageCounters(object):
self.reinst = 0
self.blocks = 0
self.totalsize = 0
+ self.restrict_fetch = 0
+ self.restrict_fetch_satisfied = 0
def __str__(self):
total_installs = self.upgrades + self.downgrades + self.newslot + self.new + self.reinst
@@ -2284,6 +2288,14 @@ class PackageCounters(object):
if total_installs != 0:
myoutput.append(")")
myoutput.append(", Size of downloads: %s" % format_size(self.totalsize))
+ if self.restrict_fetch:
+ myoutput.append("\nFetch Restriction: %s package" % \
+ self.restrict_fetch)
+ if self.restrict_fetch > 1:
+ myoutput.append("s")
+ if self.restrict_fetch_satisfied < self.restrict_fetch:
+ myoutput.append(bad(" (%s unsatisfied)") % \
+ (self.restrict_fetch - self.restrict_fetch_satisfied))
return "".join(myoutput)
class MergeTask(object):