From 8d20948fb93a31131ab6185b221f1eb3f3353543 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 10 Feb 2008 01:39:55 +0000 Subject: [PATCH] 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 --- pym/_emerge/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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: -- 2.26.2