diff --git a/rules/config b/rules/config index c54424c569cb..d081fd5aab91 100644 --- a/rules/config +++ b/rules/config @@ -262,6 +262,14 @@ TRUSTED_GPG_URLS = https://packages.trafficmanager.net/debian/public_key.gpg,htt # docker: docker base images SONIC_VERSION_CONTROL_COMPONENTS ?= none +ifeq ($(SONIC_VERSION_CONTROL_COMPONENTS),all) +override MIRROR_SNAPSHOT = y +endif + +ifneq (,$(findstring deb,$(SONIC_VERSION_CONTROL_COMPONENTS))) +override MIRROR_SNAPSHOT = y +endif + # MIRROR_SNAPSHOT - support mirror snapshot flag MIRROR_SNAPSHOT ?= n diff --git a/scripts/build_mirror_config.sh b/scripts/build_mirror_config.sh index 971390d0045f..be67052ced4c 100755 --- a/scripts/build_mirror_config.sh +++ b/scripts/build_mirror_config.sh @@ -11,7 +11,7 @@ export APT_RETRIES_COUNT DEFAULT_MIRROR_URL_PREFIX=http://packages.trafficmanager.net MIRROR_VERSION_FILE= -[[ "$SONIC_VERSION_CONTROL_COMPONENTS" == *deb* || $SONIC_VERSION_CONTROL_COMPONENTS == *all* ]] && MIRROR_VERSION_FILE=files/build/versions/default/versions-mirror && MIRROR_SNAPSHOT=y +[[ "$SONIC_VERSION_CONTROL_COMPONENTS" == *deb* || $SONIC_VERSION_CONTROL_COMPONENTS == *all* ]] && MIRROR_VERSION_FILE=files/build/versions/default/versions-mirror [ -f target/versions/default/versions-mirror ] && MIRROR_VERSION_FILE=target/versions/default/versions-mirror # The default mirror urls