From acf1d899a3178893939a1aa6a9a95c2414b42a2d Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Tue, 25 Jan 2022 14:17:14 +0100 Subject: [PATCH] Tweak cachedir handling --- build | 1 + build-vm | 2 +- init_buildsystem | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build b/build index e8293cf83..37ead218c 100755 --- a/build +++ b/build @@ -116,6 +116,7 @@ BUILD_FLAVOR= OBS_PACKAGE= OBSURL= NO_TIMESTAMPS= +CACHE_DIR= BUILD_DIST_TMP= BUILD_SUCCEEDED= COPY_SOURCES_ASIS= diff --git a/build-vm b/build-vm index 1f5268ddb..7faeb3802 100644 --- a/build-vm +++ b/build-vm @@ -786,7 +786,7 @@ vm_setup() { if test ! -w /root ; then find "$BUILD_ROOT" -type d -not -perm /200 -print0 | xargs -0 --no-run-if-empty chmod +w fi - find "$BUILD_ROOT" -mindepth 1 -maxdepth 1 -print0 | xargs -0 --no-run-if-empty rm -rf + rm -rf "$BUILD_ROOT"/* "$BUILD_ROOT"/.[^.]* if test -z "$CLEAN_BUILD" -a -e "$VM_ROOT" ; then echo "Recovering former build root" debugfs -f <(echo rdump / "$BUILD_ROOT") "$VM_ROOT" 2>/dev/null diff --git a/init_buildsystem b/init_buildsystem index 798356718..8370bbb12 100755 --- a/init_buildsystem +++ b/init_buildsystem @@ -49,8 +49,6 @@ repos=() . $BUILD_DIR/common_functions || exit 1 -detect_cache_dir - # should RPMs be installed with --force ? USE_FORCE=false PREPARE_VM= @@ -60,6 +58,7 @@ RPMLIST= CLEAN_BUILD= CREATE_BUILD_BINARIES= DLNOSIGNATURE= +CACHE_DIR= OBSURL= BUILD_SYSROOT= test -z "$CONFIG_DIR" && CONFIG_DIR="$BUILD_DIR/configs" @@ -139,6 +138,7 @@ if test -z "$BUILD_ROOT" ; then echo "Please specify a build root!" exit 1 fi +test -z "$CACHE_DIR" && detect_cache_dir BUILD_IS_RUNNING=$BUILD_ROOT/not-ready TMPFILE=$BUILD_ROOT/tmpfile