From 415fd176898716a6fa4d7c58c31393e14cc42bf1 Mon Sep 17 00:00:00 2001 From: xumia <59720581+xumia@users.noreply.github.com> Date: Tue, 23 Nov 2021 04:18:32 +0800 Subject: [PATCH] [Build]: Fix the version not found issue (#9331) When we update the a sai package downing from a remote server, we need to update the version file as well currently, but the reproducible build feature is not enabled in master, it can only be detected when merging the code into the release branches, such as 202106, 202012, etc. The reproducible feature is to reduce the build failure, not need to break the build when the version not specified. If version not specified, the best choice is to accept the version from remote server. Co-authored-by: Ubuntu --- src/sonic-build-hooks/scripts/buildinfo_base.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sonic-build-hooks/scripts/buildinfo_base.sh b/src/sonic-build-hooks/scripts/buildinfo_base.sh index cc3d7aedf8bc..0fbcd57393b3 100755 --- a/src/sonic-build-hooks/scripts/buildinfo_base.sh +++ b/src/sonic-build-hooks/scripts/buildinfo_base.sh @@ -82,8 +82,8 @@ download_packages() local filename=$(echo $url | awk -F"/" '{print $NF}' | cut -d? -f1 | cut -d# -f1) [ -f $WEB_VERSION_FILE ] && version=$(grep "^${url}=" $WEB_VERSION_FILE | awk -F"==" '{print $NF}') if [ -z "$version" ]; then - echo "Failed to verify the package: $url, the version is not specified" 2>&1 - exit 1 + echo "Warning: Failed to verify the package: $url, the version is not specified" 1>&2 + continue fi local version_filename="${filename}-${version}"