Fix issue with package install

This commit is contained in:
natemaia 2020-04-24 00:42:30 -07:00
parent 2dec81e0a8
commit f1b9165bd5

View File

@ -7,7 +7,7 @@
# shellcheck disable=SC2086,SC2046 # shellcheck disable=SC2086,SC2046
VER=2.1.30 VER=2.1.31
# default values { # default values {
@ -487,7 +487,7 @@ select_sessions()
[[ $INSTALL_WMS ]] || return 0 [[ $INSTALL_WMS ]] || return 0
for i in ${INSTALL_WMS/dwm/}; do for i in ${INSTALL_WMS/dwm/}; do
WM_PKGS+=("$i") USERWM_PKGS+=("$i")
done done
for i in $INSTALL_WMS; do for i in $INSTALL_WMS; do
@ -499,14 +499,14 @@ select_sessions()
fi fi
if [[ ${WM_EXT[$i]} ]]; then if [[ ${WM_EXT[$i]} ]]; then
for j in ${WM_EXT[$i]}; do for j in ${WM_EXT[$i]}; do
[[ ${WM_PKGS[*]} != *"$j"* ]] && WM_PKGS+=("$j") [[ ${USERWM_PKGS[*]} != *"$j"* ]] && USERWM_PKGS+=("$j")
done done
fi fi
done done
select_login || return 1 select_login || return 1
for pkg in "${WM_PKGS[@]}"; do for pkg in "${USERWM_PKGS[@]}"; do
[[ ${PACKAGES[*]} != *"$pkg"* ]] && PACKAGES+=("$pkg") [[ ${PACKAGES[*]} != *"$pkg"* ]] && PACKAGES+=("$pkg")
done done
@ -605,6 +605,7 @@ select_packages()
if [[ $UPKGS ]]; then # add any needed PKG_EXT to the list if [[ $UPKGS ]]; then # add any needed PKG_EXT to the list
for i in $UPKGS; do for i in $UPKGS; do
[[ ${USER_PKGS[*]} != *"$i"* ]] && USER_PKGS+=("$i")
if [[ ${PKG_EXT[$i]} ]]; then if [[ ${PKG_EXT[$i]} ]]; then
for j in ${PKG_EXT[$i]}; do for j in ${PKG_EXT[$i]}; do
[[ ${USER_PKGS[*]} != *"$j"* ]] && USER_PKGS+=("$j") [[ ${USER_PKGS[*]} != *"$j"* ]] && USER_PKGS+=("$j")
@ -1428,7 +1429,7 @@ install_cleanup()
[[ $LOGIN_WM == 'dwm' ]] && sed -i '/super/d; /picom/d' "$MNT/home/$user/.xprofile" "$MNT/root/.xprofile" [[ $LOGIN_WM == 'dwm' ]] && sed -i '/super/d; /picom/d' "$MNT/home/$user/.xprofile" "$MNT/root/.xprofile"
# remove some commands from ~/.xprofile when using self contained sessions # remove some commands from ~/.xprofile when using self contained sessions
if [[ $LOGIN_WM =~ ($SELF_CONTAINED_SES) || ($LOGIN_TYPE != 'xinit' && ${WM_PKGS[*]} =~ ($SELF_CONTAINED)) ]]; then if [[ $LOGIN_WM =~ ($SELF_CONTAINED_SES) || ($LOGIN_TYPE != 'xinit' && ${USERWM_PKGS[*]} =~ ($SELF_CONTAINED)) ]]; then
sed -i '/super/d; /nitrogen/d; /picom/d' "$MNT/home/$user/.xprofile" "$MNT/root/.xprofile" sed -i '/super/d; /nitrogen/d; /picom/d' "$MNT/home/$user/.xprofile" "$MNT/root/.xprofile"
fi fi
@ -1516,21 +1517,21 @@ install_packages()
if [[ $NEWSHELL == 'zsh' ]]; then if [[ $NEWSHELL == 'zsh' ]]; then
inpkg+=("zsh-completions") inpkg+=("zsh-completions")
elif [[ $PACSTRAP != 1 ]]; then elif [[ $PACSTRAP != 1 ]]; then
rmpkg+=("archlabs-installer" "zsh") rmpkg+=("zsh")
fi
if [[ $PACSTRAP != 1 ]] && pacman -Qq archlabs-installer >/dev/null 2>&1; then
rmpkg+=("archlabs-installer")
fi fi
# update and install crucial packages first to avoid issues # update and install crucial packages first to avoid issues
chrun "pacman -Syyu --noconfirm" 2> "$ERR" 2>&1 chrun "pacman -Syyu --noconfirm" 2> "$ERR" 2>&1
errshow 1 "chrun 'pacman -Syyu --noconfirm'" errshow 1 "chrun 'pacman -Syyu --noconfirm'"
chrun "pacman -S ${BASE_PKGS[*]} ${loginpkg[*]} $NEWSHELL --noconfirm --needed" 2> "$ERR" 2>&1 chrun "pacman -S ${BASE_PKGS[*]} ${loginpkg[*]} $NEWSHELL $UCODE $KERNEL --noconfirm --needed" 2> "$ERR" 2>&1
errshow 1 "chrun 'pacman -S ${BASE_PKGS[*]} ${loginpkg[*]} $NEWSHELL --noconfirm --needed'" errshow 1 "chrun 'pacman -S ${BASE_PKGS[*]} ${loginpkg[*]} $NEWSHELL $UCODE $KERNEL --noconfirm --needed'"
if [[ $PACSTRAP == 1 ]]; then
chrun "pacman -S ${ISO_PKGS[*]} --noconfirm --needed" 2> "$ERR" 2>&1
errshow 1 "chrun 'pacman -S ${ISO_PKGS[*]} --noconfirm --needed'"
fi
# reinstalling iputils fixes the network issue for non-root users # reinstalling iputils fixes the network issue for non-root users
chrun "pacman -S iputils $UCODE $KERNEL --noconfirm" # chrun "pacman -S iputils --noconfirm"
# remove the packages we don't want on the installed system # remove the packages we don't want on the installed system
[[ ${rmpkg[*]} ]] && chrun "pacman -Rnsc ${rmpkg[*]} --noconfirm" [[ ${rmpkg[*]} ]] && chrun "pacman -Rnsc ${rmpkg[*]} --noconfirm"
@ -1725,7 +1726,7 @@ install_background()
PACSTRAP=1 PACSTRAP=1
( (
install_mirrorlist "/etc/pacman.d/mirrorlist" > /tmp/bgout 2>&1 && install_mirrorlist "/etc/pacman.d/mirrorlist" > /tmp/bgout 2>&1 &&
pacstrap /mnt ${BASE_PKGS[*]} > /tmp/bgout 2>&1 && pacstrap /mnt ${BASE_PKGS[*]} ${ISO_PKGS[*]} > /tmp/bgout 2>&1 &&
cp /etc/pacman.d/mirrorlist "$MNT/etc/pacman.d/mirrorlist" cp /etc/pacman.d/mirrorlist "$MNT/etc/pacman.d/mirrorlist"
cp /etc/pacman.conf "$MNT/etc/pacman.conf" cp /etc/pacman.conf "$MNT/etc/pacman.conf"
al_repo "$MNT/etc/pacman.conf" al_repo "$MNT/etc/pacman.conf"