Skip to content

Commit

Permalink
[Build]: Fix the version not found issue (sonic-net#9331)
Browse files Browse the repository at this point in the history
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 <xumia@xumia-vm1.jqzc3g5pdlluxln0vevsg3s20h.xx.internal.cloudapp.net>
  • Loading branch information
xumia and Ubuntu committed Nov 22, 2021
1 parent 3f00461 commit 848a171
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sonic-build-hooks/scripts/buildinfo_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 848a171

Please sign in to comment.