[Build] Change the default mirror version config file (#13786)
Why I did it Change the mirror config file Use the files/build/versions/default/versions-mirror only when reproducible build enabled. The config in files/build/versions is only for reproducible build, while snapshot mirror feature does not have the dependency on the reproducible build. How I did it Skip the mirror config in files/build/versions/default/versions-mirror if reproducible build not enabled. How to verify it
This commit is contained in:
parent
cdfc5834a5
commit
8206925631
@ -555,6 +555,7 @@ endif
|
|||||||
|
|
||||||
export MIRROR_URLS
|
export MIRROR_URLS
|
||||||
export MIRROR_SECURITY_URLS
|
export MIRROR_SECURITY_URLS
|
||||||
|
export SONIC_VERSION_CONTROL_COMPONENTS
|
||||||
|
|
||||||
%:: | sonic-build-hooks
|
%:: | sonic-build-hooks
|
||||||
ifneq ($(filter y, $(MULTIARCH_QEMU_ENVIRON) $(CROSS_BUILD_ENVIRON)),)
|
ifneq ($(filter y, $(MULTIARCH_QEMU_ENVIRON) $(CROSS_BUILD_ENVIRON)),)
|
||||||
|
@ -6,7 +6,8 @@ export ARCHITECTURE=$2
|
|||||||
export DISTRIBUTION=$3
|
export DISTRIBUTION=$3
|
||||||
|
|
||||||
DEFAULT_MIRROR_URL_PREFIX=http://packages.trafficmanager.net
|
DEFAULT_MIRROR_URL_PREFIX=http://packages.trafficmanager.net
|
||||||
MIRROR_VERSION_FILE=files/build/versions/default/versions-mirror
|
MIRROR_VERSION_FILE=
|
||||||
|
[[ "$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
|
[ -f target/versions/default/versions-mirror ] && MIRROR_VERSION_FILE=target/versions/default/versions-mirror
|
||||||
|
|
||||||
# The default mirror urls
|
# The default mirror urls
|
||||||
@ -21,7 +22,7 @@ if [ "$ARCHITECTURE" == "armhf" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$MIRROR_SNAPSHOT" == y ]; then
|
if [ "$MIRROR_SNAPSHOT" == y ]; then
|
||||||
if [ -f $MIRROR_VERSION_FILE ]; then
|
if [ -f "$MIRROR_VERSION_FILE" ]; then
|
||||||
DEBIAN_TIMESTAMP=$(grep "^debian==" $MIRROR_VERSION_FILE | tail -n 1 | sed 's/.*==//')
|
DEBIAN_TIMESTAMP=$(grep "^debian==" $MIRROR_VERSION_FILE | tail -n 1 | sed 's/.*==//')
|
||||||
DEBIAN_SECURITY_TIMESTAMP=$(grep "^debian-security==" $MIRROR_VERSION_FILE | tail -n 1 | sed 's/.*==//')
|
DEBIAN_SECURITY_TIMESTAMP=$(grep "^debian-security==" $MIRROR_VERSION_FILE | tail -n 1 | sed 's/.*==//')
|
||||||
elif [ -z "$DEBIAN_TIMESTAMP" ] || [ -z "$DEBIAN_SECURITY_TIMESTAMP" ]; then
|
elif [ -z "$DEBIAN_TIMESTAMP" ] || [ -z "$DEBIAN_SECURITY_TIMESTAMP" ]; then
|
||||||
|
Reference in New Issue
Block a user