From e395dd9cb20a76c6601b1365da848c660a920882 Mon Sep 17 00:00:00 2001 From: Eyad Ahmed Date: Fri, 27 Dec 2024 19:35:26 +0000 Subject: [PATCH] Meta: Use `rm -rf` instead of `rmdir` in QEMU image build script If you run `serenity.sh run` with missing fuse2fs and/or fusermount3, then install the needed packages, and then try to run the script again, rmdir step will fail with "non-empty directory" error causing QEMU to not start. The patch avoids this by recursively removing disk mount directory instead of just unlinking it. --- Meta/build-image-qemu.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Meta/build-image-qemu.sh b/Meta/build-image-qemu.sh index f6cc5f8b394..cf6d090f24d 100755 --- a/Meta/build-image-qemu.sh +++ b/Meta/build-image-qemu.sh @@ -159,10 +159,8 @@ cleanup() { else umount mnt || ( sleep 1 && sync && umount mnt ) fi - rmdir mnt - else - rm -rf mnt fi + rm -rf mnt if [ "$(uname -s)" = "OpenBSD" ]; then vnconfig -u "$VND"