]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: Check for configured build directory if WIPE=1
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 9 Jul 2024 18:02:47 +0000 (20:02 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 10 Jul 2024 08:08:20 +0000 (10:08 +0200)
Otherwise trying to use --wipe might fail if the build directory
has not been configured but is not empty either.

mkosi.conf.d/10-arch/mkosi.build.chroot
mkosi.conf.d/10-centos-fedora/mkosi.build.chroot
mkosi.conf.d/10-debian-ubuntu/mkosi.build.chroot
mkosi.conf.d/10-opensuse/mkosi.build.chroot

index 2c99a67a252d4a5a2f39086c1983609131be3404..268bdc2ee74bcacda19a00a7a1ff6635043811b4 100755 (executable)
@@ -33,7 +33,7 @@ if ((LLVM)) && [[ -n "$SANITIZERS" ]]; then
 fi
 
 MKOSI_MESON_OPTIONS="-D mode=developer -D b_sanitize=${SANITIZERS:-none}"
-if ((WIPE)); then
+if ((WIPE)) && [[ -d "$BUILDDIR/meson-private" ]]; then
     MKOSI_MESON_OPTIONS="$MKOSI_MESON_OPTIONS --wipe"
 fi
 
index 21f106292bbb3038f8840a7757dde6be2c696b79..2b3341ccbd7c5fbe6fcf2958da37d4a24ab240c2 100755 (executable)
@@ -62,7 +62,7 @@ if ((LLVM)) && [[ -n "$SANITIZERS" ]]; then
 fi
 
 MKOSI_MESON_OPTIONS="-D mode=developer -D b_sanitize=${SANITIZERS:-none}"
-if ((WIPE)); then
+if ((WIPE)) && [[ -d "$BUILDDIR/meson-private" ]]; then
     MKOSI_MESON_OPTIONS="$MKOSI_MESON_OPTIONS --wipe"
 fi
 
index f1eed039246b093c1729da3d9d448a038cdd80d0..1a03dcd956451bf469e7cac7f0db6c64dc22582c 100755 (executable)
@@ -56,7 +56,7 @@ if ((LLVM)) && [[ -n "$SANITIZERS" ]]; then
 fi
 
 MKOSI_MESON_OPTIONS="-D mode=developer -D b_sanitize=${SANITIZERS:-none}"
-if ((WIPE)); then
+if ((WIPE)) && [[ -d "$BUILDDIR/meson-private" ]]; then
     MKOSI_MESON_OPTIONS="$MKOSI_MESON_OPTIONS --wipe"
 fi
 
index 67481d0b10c55894e32379608767771bd03f3cbc..286fd582a601ccfa9953b795ba116f056526baba 100755 (executable)
@@ -63,7 +63,7 @@ if [[ -z "${MKOSI_LDFLAGS// }" ]]; then
 fi
 
 MKOSI_MESON_OPTIONS="-D mode=developer -D b_sanitize=${SANITIZERS:-none}"
-if ((WIPE)); then
+if ((WIPE)) && [[ -d "$BUILDDIR/meson-private" ]]; then
     MKOSI_MESON_OPTIONS="$MKOSI_MESON_OPTIONS --wipe"
 fi