From a5dc54f15c1a428766729b300d3053c4be9a6886 Mon Sep 17 00:00:00 2001 From: xumia Date: Wed, 8 Jun 2022 06:52:10 +0000 Subject: [PATCH 1/2] [Bug]: fix the version file name issue --- scripts/build_debian_base_system.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_debian_base_system.sh b/scripts/build_debian_base_system.sh index 0e00eeeac532..844445cd1323 100755 --- a/scripts/build_debian_base_system.sh +++ b/scripts/build_debian_base_system.sh @@ -55,7 +55,7 @@ fi # Generate the version files for the host base image TEMP_DIR=$(mktemp -d) ./scripts/versions_manager.py generate -t $TEMP_DIR -n host-base-image -d $IMAGE_DISTRO -a $CONFIGURED_ARCH -PACKAGES=$(sed -E 's/=(=[^=]*)$/\1/' $TEMP_DIR/version-deb) +PACKAGES=$(sed -E 's/=(=[^=]*)$/\1/' $TEMP_DIR/versions-deb) if [ -z "$PACKAGES" ]; then echo "Not found host-base-image packages, please check the version files in files/build/versions/host-base-image" 2>&1 exit 1 From 7d915d83aa7270f07b863d47bc361569f42b9586 Mon Sep 17 00:00:00 2001 From: xumia Date: Wed, 8 Jun 2022 07:07:40 +0000 Subject: [PATCH 2/2] Disable version control of host-base-image if the version path does not exist --- scripts/build_debian_base_system.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_debian_base_system.sh b/scripts/build_debian_base_system.sh index 844445cd1323..a403791e5242 100755 --- a/scripts/build_debian_base_system.sh +++ b/scripts/build_debian_base_system.sh @@ -21,7 +21,7 @@ generate_version_file() 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} } -if [ "$ENABLE_VERSION_CONTROL_DEB" != "y" ]; then +if [ "$ENABLE_VERSION_CONTROL_DEB" != "y" ] || [ ! -d files/build/versions/host-base-image ]; then if [[ $CONFIGURED_ARCH == armhf || $CONFIGURED_ARCH == arm64 ]]; then if [ $MULTIARCH_QEMU_ENVIRON == "y" ]; then # qemu arm bin executable for cross-building