1 |
Author: zmedico |
2 |
Date: 2008-02-10 01:39:55 +0000 (Sun, 10 Feb 2008) |
3 |
New Revision: 9320 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/_emerge/__init__.py |
7 |
Log: |
8 |
Fix the exitcode logic for bug #209144 so that when the server is |
9 |
out of date it's not interpreted like an actual rsync exitcode |
10 |
(to avoid a misleading exitcode interpretation message). |
11 |
|
12 |
|
13 |
Modified: main/trunk/pym/_emerge/__init__.py |
14 |
=================================================================== |
15 |
--- main/trunk/pym/_emerge/__init__.py 2008-02-10 00:39:38 UTC (rev 9319) |
16 |
+++ main/trunk/pym/_emerge/__init__.py 2008-02-10 01:39:55 UTC (rev 9320) |
17 |
@@ -5569,6 +5569,7 @@ |
18 |
("-6" in all_rsync_opts or "--ipv6" in all_rsync_opts): |
19 |
family = socket.AF_INET6 |
20 |
ips=[] |
21 |
+ SERVER_OUT_OF_DATE = -1 |
22 |
while (1): |
23 |
if ips: |
24 |
del ips[0] |
25 |
@@ -5710,7 +5711,7 @@ |
26 |
print ">>> In order to force sync, remove '%s'." % servertimestampfile |
27 |
print ">>>" |
28 |
print |
29 |
- exitcode = 1 |
30 |
+ exitcode = SERVER_OUT_OF_DATE |
31 |
elif (servertimestamp == 0) or (servertimestamp > mytimestamp): |
32 |
# actual sync |
33 |
mycommand = rsynccommand + [dosyncuri+"/", myportdir] |
34 |
@@ -5740,6 +5741,8 @@ |
35 |
|
36 |
if (exitcode==0): |
37 |
emergelog(xterm_titles, "=== Sync completed with %s" % dosyncuri) |
38 |
+ elif exitcode == SERVER_OUT_OF_DATE: |
39 |
+ sys.exit(1) |
40 |
elif (exitcode>0): |
41 |
print |
42 |
if exitcode==1: |
43 |
|
44 |
-- |
45 |
gentoo-commits@l.g.o mailing list |