summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-02-10 01:50:52 +0000
committerZac Medico <zmedico@gentoo.org>2008-02-10 01:50:52 +0000
commitecab5921f953b89c854de17d385d76b8937dba7f (patch)
tree3f0265933e3f2d9cd4fc7a3fa8b0cf5da514588c
parent8d20948fb93a31131ab6185b221f1eb3f3353543 (diff)
downloadportage-ecab5921f953b89c854de17d385d76b8937dba7f.tar.gz
portage-ecab5921f953b89c854de17d385d76b8937dba7f.tar.bz2
portage-ecab5921f953b89c854de17d385d76b8937dba7f.zip
Bug #209144 - For emerge --sync, show an informative error and don't
return 1 when PORTAGE_RSYNC_RETRIES is exceeded. svn path=/main/trunk/; revision=9321
-rw-r--r--pym/_emerge/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 7680d8c49..d285e9c84 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -5570,6 +5570,7 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
family = socket.AF_INET6
ips=[]
SERVER_OUT_OF_DATE = -1
+ EXCEEDED_MAX_RETRIES = -2
while (1):
if ips:
del ips[0]
@@ -5737,12 +5738,17 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
# over retries
# exit loop
updatecache_flg=False
+ exitcode = EXCEEDED_MAX_RETRIES
break
if (exitcode==0):
emergelog(xterm_titles, "=== Sync completed with %s" % dosyncuri)
elif exitcode == SERVER_OUT_OF_DATE:
sys.exit(1)
+ elif exitcode == EXCEEDED_MAX_RETRIES:
+ sys.stderr.write(
+ ">>> Exceeded PORTAGE_RSYNC_RETRIES: %s\n" % maxretries)
+ sys.exit(1)
elif (exitcode>0):
print
if exitcode==1: