Skip to content

Commit

Permalink
repro: Version the repro chroot.
Browse files Browse the repository at this point in the history
This should make it fairly obvious something was changed and we need to
reinitialize the chroot.

Signed-off-by: Morten Linderud <[email protected]>
  • Loading branch information
Foxboron committed Nov 3, 2020
1 parent 7c9f8ce commit bd7c1e2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion repro.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bd7c1e2

Please sign in to comment.