gnulib-tool: Fallback to wget when rsync fails
authorMathieu Anquetin <mathieu@anquetin.eu>
Thu, 4 Sep 2014 06:54:48 +0000 (08:54 +0200)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 6 Sep 2014 00:17:24 +0000 (17:17 -0700)
Current implementation only tries to rsync PO files when rsync is
installed on the host. In case of error, no files are downloaded even
if they are available. This leads to bootstrap problems for hosts
that lie behind a restrictive firewall.

This patch always tries to rsync by default, falling back to wget if
an error occurs.

Signed-off-by: Mathieu Anquetin <mathieu@anquetin.eu>
ChangeLog
gnulib-tool

index d9c51262d5aa994e0b1d45c43dbe9e2d872790f4..f5bae5156c751db2ac0d093d0f6aa57bf53dcdbb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-09-05  Mathieu Anquetin  <mathieu@anquetin.eu>
+
+       Trivial change.
+       * gnulib-tool: Fallback to wget when rsync of PO files fails.
+
 2014-09-04  Eric Blake  <eblake@redhat.com>
 
        maintainer-makefile: add syntax check for useless ';;'
index 73539204b8157e2f147f62ee525979271752fcd4..5031041ad24702db47ca21860c07189aa780b2bb 100755 (executable)
@@ -5029,10 +5029,10 @@ s,//*$,/,'
        && { # Prefer rsync over wget if it is available, since it consumes
             # less network bandwidth, due to compression.
             if type rsync 2>/dev/null | grep / > /dev/null; then
-              rsync -Lrtz "${TP_RSYNC_URI}gnulib/" .
-            else
-              wget --no-verbose -r -l1 -nd -np -A.po "${TP_URL}gnulib/"
+              rsync -Lrtz "${TP_RSYNC_URI}gnulib/" . && return
             fi
+
+            wget --no-verbose -r -l1 -nd -np -A.po "${TP_URL}gnulib/"
           }
       )
     else