From 94230d70bab148fbdfadfe0f2973e98f48a3b278 Mon Sep 17 00:00:00 2001 From: natemaia Date: Sat, 17 Aug 2019 21:10:51 -0700 Subject: [PATCH] Fix: bg install failing with pacman, add fallback --- archlabs-installer | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/archlabs-installer b/archlabs-installer index 8877cbc..63b5557 100755 --- a/archlabs-installer +++ b/archlabs-installer @@ -1578,6 +1578,8 @@ install_packages() local rmpkg="" local inpkg="$PACKAGES $USER_PKGS" + [[ -x $MNT/usr/bin/X ]] || inpkg+=" $BASE_PKGS" + if pacman -Qsq 'archlabs-installer' >/dev/null 2>&1; then rmpkg+=" archlabs-installer" elif [[ -e "$MNT/usr/bin/archlabs-installer" ]]; then @@ -1706,7 +1708,7 @@ install_background() yesno "Background Install" "\nBegin install in the background?\n" || return 0 rsync -a /run/archiso/sfs/airootfs/ $MNT/ & RSYNC_PID=$! - ( install_mirrorlist "$MNT/etc/pacman.d/mirrorlist"; chrun "pacman -Syyu $BASE_PKGS --needed --noconfirm" >> /tmp/bg_out 2>&1 ) & + ( install_mirrorlist "$MNT/etc/pacman.d/mirrorlist" && sleep 1 && mkdir -p $MNT/var/lib/pacman && chrun "pacman -Syyu $BASE_PKGS --needed --noconfirm" >> /tmp/bg_out 2>&1 ) & MIRROR_PID=$! # end the background processes before exiting trap "kill $RSYNC_PID $MIRROR_PID 2>/dev/null" EXIT