coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] bootstrap: fallback to wget for downloading .po files via a


From: Jim Meyering
Subject: Re: [PATCH] bootstrap: fallback to wget for downloading .po files via a proxy
Date: Thu, 06 Oct 2011 09:14:33 +0200

Voelker, Bernhard wrote:
> Maybe a post-8.13 issue:
>
> Since 2c57c49cc39e8e7250495d4d7ce713ba06272a46, bootstrap
> fails downloading the .po files when behind a firewall,
> because rsync does not allow a proxy server to be set -
> well, at least my proxy server refuses to work together
> with rsync's RSYNC_PROXY environment variable.
>
> See also:
> http://comments.gmane.org/gmane.comp.lib.gnulib.bugs/11158
>
> Here's a patch for falling back to wget when rsync fails.
> A word to bandwidth: the --mirror option takes care about
> downloading only changed files.
>
>
>>From ae25e4072e87c8263240287844cd2fe42fe8e152 Mon Sep 17 00:00:00 2001
> From: Bernhard Voelker <address@hidden>
> Date: Mon, 5 Sep 2011 13:28:20 +0200
> Subject: [PATCH] bootstrap: fallback to wget for downloading .po files via a
>  proxy.

Thanks.  I've pushed that.

>From 43a987e1797d25a507f99603b59f6cf3cdb0a03f Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <address@hidden>
Date: Mon, 5 Sep 2011 13:28:20 +0200
Subject: [PATCH] build: let bootstrap resort to wget for downloading .po
 files

* bootstrap (download_po_files): Fallback to wget when downloading
the .po files via rsync failed.  This is necessary to bootstrap behind
a strict firewall.
---
 bootstrap |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/bootstrap b/bootstrap
index f76db9a..d165a2e 100755
--- a/bootstrap
+++ b/bootstrap
@@ -105,6 +105,11 @@ po_download_command_format=\
 "rsync --delete --exclude '*.s1' -Lrtvz \
  'translationproject.org::tp/latest/%s/' '%s'"

+# Fallback for downloading .po files (if rsync fails).
+po_download_command_format2=\
+"wget --mirror -nd -q -np -A.po -P '%s' \
+ http://translationproject.org/latest/%s/";
+
 extract_package_name='
   /^AC_INIT(/{
      /.*,.*,.*, */{
@@ -583,6 +588,9 @@ download_po_files() {
   domain=$2
   echo "$me: getting translations into $subdir for $domain..."
   cmd=`printf "$po_download_command_format" "$domain" "$subdir"`
+  eval "$cmd" && return
+  # Fallback to HTTP.
+  cmd=`printf "$po_download_command_format2" "$subdir" "$domain"`
   eval "$cmd"
 }

--
1.7.7.rc0.362.g5a14



reply via email to

[Prev in Thread] Current Thread [Next in Thread]