From ef7bde18b9e0d44ee854ed686d122767bae41097 Mon Sep 17 00:00:00 2001 From: xumia <59720581+xumia@users.noreply.github.com> Date: Tue, 18 May 2021 14:28:32 +0800 Subject: [PATCH] Skip the web proxy when downloading from proxy endpoint (#7592) Why I did it Skip to use the web proxy when the packages have been in the proxy server. For sai packages or the other packages, we will upload the the proxy server directly, the reproducible will skip to check the site, not necessary to change the version files. --- src/sonic-build-hooks/scripts/buildinfo_base.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sonic-build-hooks/scripts/buildinfo_base.sh b/src/sonic-build-hooks/scripts/buildinfo_base.sh index ae85c2dcf129..cc3d7aedf8bc 100755 --- a/src/sonic-build-hooks/scripts/buildinfo_base.sh +++ b/src/sonic-build-hooks/scripts/buildinfo_base.sh @@ -71,6 +71,12 @@ download_packages() if [[ "$para" == *://* ]]; then local url=$para local real_version= + + # Skip to use the proxy, if the url has already used the proxy server + if [[ $url == ${URL_PREFIX}* ]]; then + continue + fi + if [ "$ENABLE_VERSION_CONTROL_WEB" == y ]; then local version= local filename=$(echo $url | awk -F"/" '{print $NF}' | cut -d? -f1 | cut -d# -f1)