From fd8692d51ce7cbaae990b876832bef1383a465d1 Mon Sep 17 00:00:00 2001 From: Rustiqly Date: Sat, 14 Feb 2026 08:58:49 -0800 Subject: [PATCH] [build-hooks] Fix wget cache skip for trafficmanager.net URLs The URL_PREFIX variable was computed by stripping the path from PACKAGE_URL_PREFIX, keeping only the scheme and hostname (e.g. https://packages.trafficmanager.net/). This caused the wget hook's download_packages() to skip any URL matching that hostname prefix via 'continue', bypassing both the download and version tracking entirely. After commit 805e1288a5 changed download URLs from sonicstorage.blob.core.windows.net to packages.trafficmanager.net, the download URLs (under /public/) now share the same hostname as PACKAGE_URL_PREFIX (under /packages/), triggering the skip condition. wget silently produces no output and the expected files are never created, breaking slave image builds. Fix by using the full PACKAGE_URL_PREFIX as URL_PREFIX instead of only the hostname. This ensures only URLs that are actual proxy redirects (under /packages/) are skipped, while URLs under other paths (e.g. /public/) are downloaded normally. Fixes: sonic-net/sonic-buildimage#23352 Signed-off-by: Rustiqly --- src/sonic-build-hooks/scripts/buildinfo_base.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-build-hooks/scripts/buildinfo_base.sh b/src/sonic-build-hooks/scripts/buildinfo_base.sh index cd951363747..474e5d8a5c0 100755 --- a/src/sonic-build-hooks/scripts/buildinfo_base.sh +++ b/src/sonic-build-hooks/scripts/buildinfo_base.sh @@ -34,7 +34,7 @@ PKG_CACHE_FILE_NAME=${PKG_CACHE_PATH}/cache.tgz . ${BUILDINFO_PATH}/scripts/utils.sh -URL_PREFIX=$(echo "${PACKAGE_URL_PREFIX}" | sed -E "s#(//[^/]*/).*#\1#") +URL_PREFIX="${PACKAGE_URL_PREFIX}" log_err() {