summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-19 03:11:17 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-19 03:11:17 +0000
commitb25cd73c543c828e8711b1e890ca064911d7042d (patch)
tree9010316a12fdb5156b10fa8b943367a886db9a10
parent1da85da5f7033e9adbdbac2d72355b7b86beb7a6 (diff)
downloadportage-b25cd73c543c828e8711b1e890ca064911d7042d.tar.gz
portage-b25cd73c543c828e8711b1e890ca064911d7042d.tar.bz2
portage-b25cd73c543c828e8711b1e890ca064911d7042d.zip
For bug #158508, make --fetchonly display a list of packages for which the fetch phase failed.
svn path=/main/trunk/; revision=5322
-rwxr-xr-xbin/emerge16
1 files changed, 11 insertions, 5 deletions
diff --git a/bin/emerge b/bin/emerge
index 1a41d96c6..7ca854804 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -2511,7 +2511,7 @@ class MergeTask(object):
portage.config(clone=trees["/"]["vartree"].settings)
def merge(self, mylist, favorites, mtimedb):
- returnme=0
+ failed_fetches = []
mymergelist=[]
ldpath_mtimes = mtimedb["ldpath"]
xterm_titles = "notitles" not in self.settings.features
@@ -2659,7 +2659,7 @@ class MergeTask(object):
print
print "!!! Fetch for",y,"failed, continuing..."
print
- returnme=1
+ failed_fetches.append(pkg_key)
continue
portage.doebuild_environment(y, "setup", myroot,
@@ -2885,9 +2885,15 @@ class MergeTask(object):
#by doing an exit this way, --fetchonly can continue to try to
#fetch everything even if a particular download fails.
if "--fetchonly" in self.myopts or "--fetch-all-uri" in self.myopts:
- if returnme:
- print "\n\n!!! Some fetch errors were encountered. Please see above for details.\n\n"
- sys.exit(returnme)
+ if failed_fetches:
+ sys.stderr.write("\n\n!!! Some fetch errors were " + \
+ "encountered. Please see above for details.\n\n")
+ for cpv in failed_fetches:
+ sys.stderr.write(" ")
+ sys.stderr.write(cpv)
+ sys.stderr.write("\n")
+ sys.stderr.write("\n")
+ sys.exit(1)
else:
sys.exit(0)
return os.EX_OK