Skip to content

Commit c010403

Browse files
committed
[Bug]: fix the version file name issue (sonic-net#11072)
Why I did it [Bug]: fix the version file name issue
1 parent f98814d commit c010403

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/build_debian_base_system.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ generate_version_file()
2121
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "dpkg-query -W -f '\${Package}==\${Version}\n'" > $TARGET_BASEIMAGE_PATH/versions-deb-${IMAGE_DISTRO}-${CONFIGURED_ARCH}
2222
}
2323

24-
if [ "$ENABLE_VERSION_CONTROL_DEB" != "y" ]; then
24+
if [ "$ENABLE_VERSION_CONTROL_DEB" != "y" ] || [ ! -d files/build/versions/host-base-image ]; then
2525
if [[ $CONFIGURED_ARCH == armhf || $CONFIGURED_ARCH == arm64 ]]; then
2626
if [ $MULTIARCH_QEMU_ENVIRON == "y" ]; then
2727
# qemu arm bin executable for cross-building
@@ -55,7 +55,7 @@ fi
5555
# Generate the version files for the host base image
5656
TEMP_DIR=$(mktemp -d)
5757
./scripts/versions_manager.py generate -t $TEMP_DIR -n host-base-image -d $IMAGE_DISTRO -a $CONFIGURED_ARCH
58-
PACKAGES=$(sed -E 's/=(=[^=]*)$/\1/' $TEMP_DIR/version-deb)
58+
PACKAGES=$(sed -E 's/=(=[^=]*)$/\1/' $TEMP_DIR/versions-deb)
5959
if [ -z "$PACKAGES" ]; then
6060
echo "Not found host-base-image packages, please check the version files in files/build/versions/host-base-image" 2>&1
6161
exit 1

0 commit comments

Comments
 (0)