[PATCH 2 of 7] scripts/functions: svn retrival first tries the mirror for tarballs
Yann E. MORIN
yann.morin.1998@anciens.enib.fr
Tue Aug 2 22:54:00 GMT 2011
scripts/functions | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
# HG changeset patch
# User "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
# Date 1312302490 -7200
# Node ID a7695034131d5b3a89f661de4b8b1337a36206f1
# Parent 31555535d94af201270fbf9adc247c6c6e95a619
scripts/functions: svn retrival first tries the mirror for tarballs
The svn download helper looks for the local tarballs dir to see if it
can find a pre-downloaded tarball, and if it does not find it, does
the actual fetch to upstream via svn.
In the process, it does not even try to get a tarball from the local
mirror, which can be useful if the mirror has been pre-populated
manually (or with a previously downloaded tree).
Fake a tarball get with the standard tarball-download helper, but
without specifying any upstream URL, which makes the helper directly
try the LAN mirror.
Of course, if no mirror is specified, no URL wil be available, and
the standard svn retrieval will kick in.
Reported-by: ANDY KENNEDY <ANDY.KENNEDY@adtran.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
diff --git a/scripts/functions b/scripts/functions
--- a/scripts/functions
+++ b/scripts/functions
@@ -629,11 +629,11 @@
local uri="$2"
local rev="$3"
- # Does it exist localy?
- CT_GetLocal "${basename}" && return 0 || true
- # No, it does not...
-
- CT_DoLog EXTRA "Retrieving '${basename}'"
+ # First try locally, then the mirror
+ if CT_GetFile "${basename}"; then
+ # Got it! Return early! :-)
+ return 0
+ fi
CT_MktempDir tmp_dir
CT_Pushd "${tmp_dir}"
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list