configure: detect supported retry flags for wget.

Some systems may be using wget2 symlinked to wget (Fedora,
currently), which doesn't support --retry-on-host-error.

Change-Id: I9fac080e7ac1cc4c39a03f6c27e9c42f8697ecff
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8336
Tested-by: Commit checker robot <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
Jessica Hamilton
2024-10-14 11:01:19 +00:00
committed by Adrien Destugues
parent 66582b42a5
commit 7c6ab83094
2 changed files with 13 additions and 1 deletions
+7 -1
View File
@@ -449,6 +449,12 @@ rule DownloadLocatedFile target : url : source
URL on $(target) = $(url) ;
if $(HOST_WGET_RETRY_ON_HOST_ERROR) {
WGET_RETRY_FLAGS on $(target) = "--retry-connrefused --retry-on-host-error" ;
} else {
WGET_RETRY_FLAGS on $(target) = "--retry-connrefused" ;
}
if $(source) {
Depends $(target) : $(source) ;
}
@@ -467,7 +473,7 @@ if $(HAIKU_NO_DOWNLOADS) = 1 {
actions DownloadLocatedFile1
{
source="$(2)"
wget --retry-connrefused --retry-on-host-error --timeout 30 -O "$(1)" $(URL) || exit 1
wget $(WGET_RETRY_FLAGS) --timeout 30 -O "$(1)" $(URL) || exit 1
touch "$(1)"
}
}