You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With ENABLE_VERSION_CONTROL_DEB=y, the version defined in versions file for debian packages never being used.
if [[ "$para"!= -* ]];then# All packages in apt-get command are passedcontinuefiif [ !-z"$INSTALL" ];thenif [[ "$para"==*=* ]];thencontinueelif [[ "$para"==*=* ]];then# duplicate checkcontinueelse
package=$paraif! grep -q "^${package}="$VERSION_FILE;thenecho"The version of the package ${package} is not specified."exit 1
fi# the version defined in VERSION_FILE is never extracted and usedfielif [[ "$para"=="install" ]];then
INSTALL=y
fi
...
$REAL_COMMAND"$@"# the version defined in VERSION_FILE is never used
Besides the incorrect script, many deb packages versions are missing in versions file.
Describe the results you expected:
To fix the bugs in the apt-get hook:
parameters=("$@")
if [ "$ENABLE_VERSION_CONTROL_DEB"=="y" ];thenfor(( i=0; i <$#; i++))do
para=${parameters[$i]}if [[ "$para"== -* ]];thencontinuefiif [ !-z"$INSTALL" ];thenif [[ "$para"==*=* ]];thencontinueelse
package=$para
[ -f"$VERSION_FILE" ] && version=`grep $package$VERSION_FILE| awk -F"=="'{print$2}'`if [[ -z"$version" ]];thenecho"Error: The version of the package ${package} is not specified."1>&2exit 1
fi
parameters[$i]="${package}=${version}"fielif [[ "$para"=="install" ]];then
INSTALL=y
fidonefi$REAL_COMMAND"${parameters[@]}"
Fix the logic to collect deb packages versions to include all intermediate packages versions during build.
The text was updated successfully, but these errors were encountered:
Description
The apt-get hook script contains incorrect logic.
Also as mentioned in [Reproducible Build] Installing packages during docker-sonic-vs.gz build is rejected by versions control framework #7152 (comment):
Some debian packages installation are not reproducible (eg. python3-pip), they are installed during build but uninstalled later, thus not captured in versions-deb files. After fix the logic in apt-get script, these packages are not able to be verified when version control is enabled.
Describe the results you received:
ENABLE_VERSION_CONTROL_DEB=y
, the version defined in versions file for debian packages never being used.Describe the results you expected:
apt-get
hook:The text was updated successfully, but these errors were encountered: