[Build] Optimize the version control for Debian packages (#14557)
Why I did it Optimize the version control for Debian packages. Fix sonic-slave-buster/sources.list.amd64 not found display issue, need to generate the file before running the shell command to evaluate the sonic image tag. When using the snapshot mirror, it is not necessary to update the version file based on the base image. It will reduce the version dependency issue, when an image is not run when freezing the version. How I did it Not to update the version file when snapshot mirror enabled. How to verify it
This commit is contained in:
parent
d7d6445abf
commit
ad162ae0e8
@ -224,6 +224,7 @@ PREPARE_DOCKER=BUILD_SLAVE=y \
|
||||
DEFAULT_CONTAINER_REGISTRY=$(DEFAULT_CONTAINER_REGISTRY) \
|
||||
SONIC_VERSION_CACHE=$(SONIC_VERSION_CACHE) \
|
||||
DBGOPT='$(DBGOPT)' \
|
||||
MIRROR_SNAPSHOT=$(MIRROR_SNAPSHOT) \
|
||||
scripts/prepare_docker_buildinfo.sh \
|
||||
$(SLAVE_BASE_IMAGE) \
|
||||
$(SLAVE_DIR)/Dockerfile \
|
||||
|
@ -38,7 +38,7 @@ if [ -z "$DISTRO" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$IMAGENAME" == docker-base-* ]] || [[ "$IMAGENAME" == docker-ptf ]]; then
|
||||
if [[ "$IMAGENAME" == sonic-slave-* ]] || [[ "$IMAGENAME" == docker-base-* ]] || [[ "$IMAGENAME" == docker-ptf ]]; then
|
||||
scripts/build_mirror_config.sh ${DOCKERFILE_PATH} $ARCH $DISTRO
|
||||
fi
|
||||
|
||||
|
@ -382,6 +382,9 @@ update_version_file()
|
||||
update_version_files()
|
||||
{
|
||||
local version_names="versions-deb versions-py2 versions-py3"
|
||||
if [ "$MIRROR_SNAPSHOT" == y ]; then
|
||||
version_names="versions-py2 versions-py3"
|
||||
fi
|
||||
for version_name in $version_names; do
|
||||
update_version_file $version_name
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user