Retry wget on non-critical failures to try to avoid tmp dns issues

This commit is contained in:
Alexandre Aubin 2020-06-04 00:48:18 +02:00
parent ca89607d9d
commit 3d66eaec01

View file

@ -145,7 +145,7 @@ ynh_setup_source () {
cp $local_src $src_filename
else # If not, download the source
# Timeout option is here to enforce the timeout on dns query and tcp connect (c.f. man wget)
local out=`wget --timeout 900 --no-verbose --output-document=$src_filename $src_url 2>&1` || ynh_print_err --message="$out"
local out=`wget --tries 3 --no-dns-cache --timeout 900 --no-verbose --output-document=$src_filename $src_url 2>&1` || ynh_print_err --message="$out"
fi
# Check the control sum