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:
committed by
Adrien Destugues
parent
66582b42a5
commit
7c6ab83094
+7
-1
@@ -449,6 +449,12 @@ rule DownloadLocatedFile target : url : source
|
|||||||
|
|
||||||
URL on $(target) = $(url) ;
|
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) {
|
if $(source) {
|
||||||
Depends $(target) : $(source) ;
|
Depends $(target) : $(source) ;
|
||||||
}
|
}
|
||||||
@@ -467,7 +473,7 @@ if $(HAIKU_NO_DOWNLOADS) = 1 {
|
|||||||
actions DownloadLocatedFile1
|
actions DownloadLocatedFile1
|
||||||
{
|
{
|
||||||
source="$(2)"
|
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)"
|
touch "$(1)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -907,6 +907,11 @@ case $PYTHON_VERSION in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# check if wget supports --retry-on-host-error
|
||||||
|
if wget --retry-on-host-error --version > /dev/null 2>&1; then
|
||||||
|
HOST_WGET_RETRY_ON_HOST_ERROR=1
|
||||||
|
fi
|
||||||
|
|
||||||
# check if nasm can actually output ELF files
|
# check if nasm can actually output ELF files
|
||||||
# (the stock version in OSX can't)
|
# (the stock version in OSX can't)
|
||||||
# XXX: should probably only test for x86* arch
|
# XXX: should probably only test for x86* arch
|
||||||
@@ -1159,6 +1164,7 @@ HOST_OBJCOPY ?= ${HOST_GCC_OBJCOPY} ;
|
|||||||
HOST_EXTENDED_REGEX_SED ?= ${HOST_EXTENDED_REGEX_SED} ;
|
HOST_EXTENDED_REGEX_SED ?= ${HOST_EXTENDED_REGEX_SED} ;
|
||||||
HOST_SHA256 ?= ${HOST_SHA256} ;
|
HOST_SHA256 ?= ${HOST_SHA256} ;
|
||||||
HOST_PYTHON ?= ${HOST_PYTHON} ;
|
HOST_PYTHON ?= ${HOST_PYTHON} ;
|
||||||
|
HOST_WGET_RETRY_ON_HOST_ERROR ?= ${HOST_WGET_RETRY_ON_HOST_ERROR} ;
|
||||||
HAIKU_NASM ?= ${HAIKU_NASM} ;
|
HAIKU_NASM ?= ${HAIKU_NASM} ;
|
||||||
|
|
||||||
HAIKU_BUILD_ATTRIBUTES_DIR ?= "${HAIKU_BUILD_ATTRIBUTES_DIR}" ;
|
HAIKU_BUILD_ATTRIBUTES_DIR ?= "${HAIKU_BUILD_ATTRIBUTES_DIR}" ;
|
||||||
|
|||||||
Reference in New Issue
Block a user