summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-02-10 01:39:55 +0000
committerZac Medico <zmedico@gentoo.org>2008-02-10 01:39:55 +0000
commit8d20948fb93a31131ab6185b221f1eb3f3353543 (patch)
treecd13bd1e025347afa6f444880d0cc756c198dc89
parent57ffa455f7a5cf6b4f4dd544577693ca90972f20 (diff)
downloadportage-8d20948fb93a31131ab6185b221f1eb3f3353543.tar.gz
portage-8d20948fb93a31131ab6185b221f1eb3f3353543.tar.bz2
portage-8d20948fb93a31131ab6185b221f1eb3f3353543.zip
Fix the exitcode logic for bug #209144 so that when the server is
out of date it's not interpreted like an actual rsync exitcode (to avoid a misleading exitcode interpretation message). svn path=/main/trunk/; revision=9320
-rw-r--r--pym/_emerge/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 469d06582..7680d8c49 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -5569,6 +5569,7 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
("-6" in all_rsync_opts or "--ipv6" in all_rsync_opts):
family = socket.AF_INET6
ips=[]
+ SERVER_OUT_OF_DATE = -1
while (1):
if ips:
del ips[0]
@@ -5710,7 +5711,7 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
print ">>> In order to force sync, remove '%s'." % servertimestampfile
print ">>>"
print
- exitcode = 1
+ exitcode = SERVER_OUT_OF_DATE
elif (servertimestamp == 0) or (servertimestamp > mytimestamp):
# actual sync
mycommand = rsynccommand + [dosyncuri+"/", myportdir]
@@ -5740,6 +5741,8 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
if (exitcode==0):
emergelog(xterm_titles, "=== Sync completed with %s" % dosyncuri)
+ elif exitcode == SERVER_OUT_OF_DATE:
+ sys.exit(1)
elif (exitcode>0):
print
if exitcode==1: