Skip to content

Commit 881abd3

Browse files
authored
enable MIRROR_SNAPSHOT if SONIC_VERSION_CONTROL_COMPONENTS includes deb (sonic-net#17148)
Fix sonic-net#17113 If we set MIRROR_SNAPSHOT=y in build_mirror_config.sh then we have incorrect value of MIRROR_SNAPSHOT in other places like buildinfo/config/buildinfo.config How I did it Override MIRROR_SNAPSHOT=y in rules/config if SONIC_VERSION_CONTROL_COMPONENTS=all or SONIC_VERSION_CONTROL_COMPONENTS includes deb component. How to verify it Start to build with different values of SONIC_VERSION_CONTROL_COMPONENTS and MIRROR_SNAPSHOT in cmdline and check value of MIRROR_SNAPSHOT in buildinfo.config and debian mirrors in sources.list files
1 parent d31e84a commit 881abd3

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

rules/config

+8
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,14 @@ TRUSTED_GPG_URLS = https://packages.trafficmanager.net/debian/public_key.gpg,htt
262262
# docker: docker base images
263263
SONIC_VERSION_CONTROL_COMPONENTS ?= none
264264

265+
ifeq ($(SONIC_VERSION_CONTROL_COMPONENTS),all)
266+
override MIRROR_SNAPSHOT = y
267+
endif
268+
269+
ifneq (,$(findstring deb,$(SONIC_VERSION_CONTROL_COMPONENTS)))
270+
override MIRROR_SNAPSHOT = y
271+
endif
272+
265273
# MIRROR_SNAPSHOT - support mirror snapshot flag
266274
MIRROR_SNAPSHOT ?= n
267275

scripts/build_mirror_config.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export APT_RETRIES_COUNT
1111

1212
DEFAULT_MIRROR_URL_PREFIX=http://packages.trafficmanager.net
1313
MIRROR_VERSION_FILE=
14-
[[ "$SONIC_VERSION_CONTROL_COMPONENTS" == *deb* || $SONIC_VERSION_CONTROL_COMPONENTS == *all* ]] && MIRROR_VERSION_FILE=files/build/versions/default/versions-mirror && MIRROR_SNAPSHOT=y
14+
[[ "$SONIC_VERSION_CONTROL_COMPONENTS" == *deb* || $SONIC_VERSION_CONTROL_COMPONENTS == *all* ]] && MIRROR_VERSION_FILE=files/build/versions/default/versions-mirror
1515
[ -f target/versions/default/versions-mirror ] && MIRROR_VERSION_FILE=target/versions/default/versions-mirror
1616

1717
# The default mirror urls

0 commit comments

Comments
 (0)