From 7b57ee7a3cec06baf2ac062e8bc7f146404bff44 Mon Sep 17 00:00:00 2001 From: Ian Leonard Date: Sat, 19 Oct 2024 02:26:30 -0400 Subject: [PATCH 1/2] scripts/get_archive: error on 400 series http status codes Signed-off-by: Ian Leonard --- scripts/get_archive | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/get_archive b/scripts/get_archive index b53cf596e3..1753c08378 100755 --- a/scripts/get_archive +++ b/scripts/get_archive @@ -23,7 +23,7 @@ pkg_lock_status "GETPKG" "${PKG_NAME}" "unpack" "downloading package..." PACKAGE_MIRROR="${DISTRO_MIRROR}/${PKG_NAME}/${PKG_SOURCE_NAME}" [ "${VERBOSE}" != "yes" ] && GET_OPT="--silent --show-error" -GET_CMD="curl ${GET_OPT} --connect-timeout 30 --retry 3 --continue-at - --location --max-redirs 5 --output ${PACKAGE}" +GET_CMD="curl ${GET_OPT} --fail --connect-timeout 30 --retry 3 --continue-at - --location --max-redirs 5 --output ${PACKAGE}" # unset LD_LIBRARY_PATH to stop wget from using toolchain/lib and loading libssl.so/libcrypto.so instead of host libraries unset LD_LIBRARY_PATH From 509961e11d6879504942fe38129809875b22825f Mon Sep 17 00:00:00 2001 From: Ian Leonard Date: Sat, 19 Oct 2024 02:26:50 -0400 Subject: [PATCH 2/2] tools/distro-tool: error on 400 series http status codes Signed-off-by: Ian Leonard --- tools/distro-tool | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/distro-tool b/tools/distro-tool index 150eaf5f32..00441bc0bd 100755 --- a/tools/distro-tool +++ b/tools/distro-tool @@ -357,7 +357,7 @@ class MyUtility(object): while attempts < retries: if stopped.is_set(): break attempts += 1 - (result, output) = MyUtility.runcommand(msgs, f"curl --silent --show-error --connect-timeout 30 --retry 3 --continue-at - --location --max-redirs 5 --output {filename_data} {url}", logfile=filename_log) + (result, output) = MyUtility.runcommand(msgs, f"curl --silent --show-error --fail --connect-timeout 30 --retry 3 --continue-at - --location --max-redirs 5 --output {filename_data} {url}", logfile=filename_log) if result == 0: return True