From 0ac81e3c96e5aba8b230cf3ef090a226e8c81a02 Mon Sep 17 00:00:00 2001 From: xumia <59720581+xumia@users.noreply.github.com> Date: Sun, 3 Jan 2021 17:32:20 +0800 Subject: [PATCH] Fix the hostimage version path permission issue (#6337) --- build_debian.sh | 2 +- scripts/collect_host_image_version_files.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build_debian.sh b/build_debian.sh index c642e5d8cf..53ac934bd3 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -578,7 +578,7 @@ sudo du -hsx $FILESYSTEM_ROOT sudo mkdir -p $FILESYSTEM_ROOT/var/lib/docker sudo mksquashfs $FILESYSTEM_ROOT $FILESYSTEM_SQUASHFS -e boot -e var/lib/docker -e $PLATFORM_DIR -sudo scripts/collect_host_image_version_files.sh $TARGET_PATH $FILESYSTEM_ROOT +scripts/collect_host_image_version_files.sh $TARGET_PATH $FILESYSTEM_ROOT if [[ $CONFIGURED_ARCH == armhf || $CONFIGURED_ARCH == arm64 ]]; then # Remove qemu arm bin executable used for cross-building diff --git a/scripts/collect_host_image_version_files.sh b/scripts/collect_host_image_version_files.sh index 3e06bcfb23..2cabc049d9 100755 --- a/scripts/collect_host_image_version_files.sh +++ b/scripts/collect_host_image_version_files.sh @@ -4,6 +4,7 @@ TARGET=$1 FILESYSTEM_ROOT=$2 VERSIONS_PATH=$TARGET/versions/host-image +[ -d $VERSIONS_PATH ] && sudo rm -rf $VERSIONS_PATH mkdir -p $VERSIONS_PATH sudo LANG=C chroot $FILESYSTEM_ROOT post_run_buildinfo