Bug #339642 - Make --sync try all addresses.
authorZac Medico <zmedico@gentoo.org>
Mon, 4 Oct 2010 18:40:23 +0000 (11:40 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 4 Oct 2010 18:40:23 +0000 (11:40 -0700)
cnf/make.conf
cnf/make.globals
make.conf.txt
man/make.conf.5
pym/_emerge/actions.py

index b08e81cf4606c6d06af21201f1d25286f03ba24c..8d07752f15e3b3fff2bfe055b3655c164975c975 100644 (file)
 # PORTAGE_RSYNC_RETRIES sets the number of times portage will attempt to retrieve
 #     a current portage tree before it exits with an error. This allows
 #     for a more successful retrieval without user intervention most times.
-#PORTAGE_RSYNC_RETRIES="3"
+#     If set to a negative number, then retry until all possible addresses are
+#     exhausted.
+#PORTAGE_RSYNC_RETRIES="-1"
 #
 # PORTAGE_RSYNC_EXTRA_OPTS can be used to feed additional options to the rsync
 #     command used by `emerge --sync`. This will not change the default options
index 9ba10444b18c6e94d456ecac5bba04c94c7e3168..39ea548b9893cd0051ca49aee7c7762d9811fff0 100644 (file)
@@ -88,7 +88,7 @@ PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS="5"
 PORTAGE_FETCH_RESUME_MIN_SIZE="350K"
 
 # Number of times 'emerge --sync' will run before giving up.
-PORTAGE_RSYNC_RETRIES="3"
+PORTAGE_RSYNC_RETRIES="-1"
 
 # Number of seconds rsync will wait before timing out.
 #RSYNC_TIMEOUT="180"
index 4531ed859d0389b5309ecd4c52d5dd4d48bcd3bb..5bbb6e346c825c4637d5ba38eb37dc249083d5fd 100644 (file)
@@ -522,7 +522,7 @@ you know exactly what you're doing!**
 PORTAGE_RSYNC_RETRIES
 ---------------------
 
-:default: 3
+:default: -1
 :valdesc: integer
 
 The number of times rsync should retry on failed connections before giving up.
index a55e7fc9710da21bd193200f4eaec970bf1e5f45..faab2b90bd5bd635e18281d7968f8815e903a3ef 100644 (file)
@@ -1,4 +1,4 @@
-.TH "MAKE.CONF" "5" "Aug 2010" "Portage VERSION" "Portage"
+.TH "MAKE.CONF" "5" "Oct 2010" "Portage VERSION" "Portage"
 .SH "NAME"
 make.conf \- custom settings for Portage
 .SH "SYNOPSIS"
@@ -703,9 +703,10 @@ Defaults to "\-\-recursive \-\-links \-\-safe\-links \-\-perms \-\-times
 .TP
 \fBPORTAGE_RSYNC_RETRIES\fR = \fI[NUMBER]\fR
 The number of times rsync should retry on failed connections before
-giving up.
+giving up. If set to a negative number, then retry until all possible
+addresses are exhausted.
 .br
-Defaults to 3.
+Defaults to -1.
 .TP
 \fBPORTAGE_SYNC_STALE\fR = \fI[NUMBER]\fR
 Defines the number of days after the last `emerge \-\-sync` that a warning
index a5bb0e52cf9ccd68624838300643c2b01c3d7c3f..6dad3785c855746a04c1f2387dd87ff16a4776b6 100644 (file)
@@ -2068,7 +2068,7 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
                except SystemExit as e:
                        raise # Needed else can't exit
                except:
-                       maxretries=3 #default number of retries
+                       maxretries = -1 #default number of retries
 
                retries=0
                user_name, hostname, port = re.split(
@@ -2264,9 +2264,8 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
 
                        retries=retries+1
 
-                       if retries<=maxretries:
+                       if maxretries < 0 or retries <= maxretries:
                                print(">>> Retrying...")
-                               time.sleep(11)
                        else:
                                # over retries
                                # exit loop