From af1663d62e5c51217c8d4c9b343915945b976854 Mon Sep 17 00:00:00 2001 From: neil Date: Wed, 27 Dec 2017 02:46:55 +0000 Subject: [PATCH] Do not retry SF downloads by directly accessing mirrors. This is necessary because the main SF download server redirects our possibly outdated paths to the required full path, but mirrors do not do so (meaning that there is no point in accessing the mirrors directly). Instead, we now retry the download from the main server several times (we may be redirected to different mirrors on each try). I implemented this by reducing the SF mirror list to just the main server, and adding wget's --retry-connrefused option so that we continue retrying when an SF mirror is down (as it will also retry for non-SF servers, I also reduced the number of tries from 5 to 3, to avoid having too many retries). git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@54981 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- scripts/fetch.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/fetch.sh b/scripts/fetch.sh index 3b4b490947..9d95a35393 100755 --- a/scripts/fetch.sh +++ b/scripts/fetch.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright © 2004-2016, The AROS Development Team. All rights reserved. +# Copyright © 2004-2017, The AROS Development Team. All rights reserved. # $Id$ @@ -41,7 +41,10 @@ fetch_gnu() $ret } -sf_mirrors="http://download.sourceforge.net http://aleron.dl.sourceforge.net http://voxel.dl.sourceforge.net http://heanet.dl.sourceforge.net http://avh.dl.sourceforge.net http://umn.dl.sourceforge.net http://unc.dl.sourceforge.net http://puzzle.dl.sourceforge.net http://mesh.dl.sourceforge.net" +# Note: at time of writing, the main SF download server redirects to mirrors +# and corrects moved paths, so we retry this server multiple times (in one +# wget call). +sf_mirrors="http://downloads.sourceforge.net" fetch_sf() { @@ -87,7 +90,7 @@ fetch() case $protocol in https| http | ftp) - if ! wget -t 5 -T 15 -c "$origin/$file" -O "$destination/$file".tmp; then + if ! wget -t 3 --retry-connrefused -T 15 -c "$origin/$file" -O "$destination/$file".tmp; then ret=false else mv "$destination/$file".tmp "$destination/$file" -- 2.11.4.GIT