From: Zac Medico Date: Sun, 10 Feb 2008 01:39:55 +0000 (-0000) Subject: Fix the exitcode logic for bug #209144 so that when the server is X-Git-Tag: v2.2_pre2~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8d20948fb93a31131ab6185b221f1eb3f3353543;p=portage.git 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 --- 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: