From bd7c1e2bf906f096046db512d69344beae6d877f Mon Sep 17 00:00:00 2001 From: Morten Linderud Date: Tue, 3 Nov 2020 22:51:17 +0100 Subject: [PATCH] repro: Version the repro chroot. This should make it fairly obvious something was changed and we need to reinitialize the chroot. Signed-off-by: Morten Linderud --- repro.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/repro.in b/repro.in index c9a40a3..5d57d09 100755 --- a/repro.in +++ b/repro.in @@ -229,9 +229,13 @@ function init_chroot(){ exec_nspawn root pacman-key --init &> /dev/null exec_nspawn root pacman-key --populate archlinux &> /dev/null exec_nspawn root pacman -Sy + touch "$BUILDDIRECTORY/root/.repro-1" lock_close 9 else - + if [ ! -d "$BUILDDIRECTORY/root/.repro-1" ]; then + error "Please delete $BUILDDIRECTORY and initialize the chroots again" + exit 1 + fi if lock 9 "$BUILDDIRECTORY"/root.lock; then printf 'Server = %s\n' "$HOSTMIRROR" > "$BUILDDIRECTORY"/root/etc/pacman.d/mirrorlist exec_nspawn root pacman -Syu --noconfirm