diff --git a/installer b/installer index 69c1fbc..44d759b 100755 --- a/installer +++ b/installer @@ -6,7 +6,7 @@ # AIF, Calamares, and the Arch Wiki.. Credit where credit is due # shellcheck disable=SC2086,SC2046,SC2254,SC2164 -VER=2.1.58 +VER=2.1.59 # default values { @@ -203,17 +203,16 @@ declare -A LOGIN_PKGS=( declare -A PKG_EXT=( [bluez]='bluez-libs bluez-utils bluez-tools bluez-plugins bluez-hid2hci' [cairo-dock]='cairo-dock-plug-ins' -[kdenlive]='qt5ct qt5-styleplugins' +[kdenlive]='qt5ct' [mpd]='mpc' [mupdf]='mupdf-tools' [noto-fonts]='noto-fonts-emoji' [pcmanfm]='tumbler' -[qbittorrent]='qt5ct qt5-styleplugins' -[qt5ct]='qt5-styleplugins' -[qutebrowser]='qt5ct qt5-styleplugins' +[qbittorrent]='qt5ct' +[qutebrowser]='qt5ct' [thunar]='tumbler thunar-volman' -[transmission-qt]='qt5ct qt5-styleplugins' -[vlc]='qt5ct qt5-styleplugins' +[transmission-qt]='qt5ct' +[vlc]='qt5ct' [zathura]='zathura-pdf-poppler' ) # } @@ -2007,9 +2006,9 @@ install_bootldr() install_packages() { - typeset -a inpkg rmpkg + typeset -a inpkg rmpkg goodinpkg - inpkg=("${SES_PKGS[@]}" "${USER_PKGS[@]}") + inpkg=("${SES_PKGS[@]}" "${USER_PKGS[@]}" "$NEWSHELL") if [[ $INSTALL_WMS ]]; then inpkg+=("${BASE_PKGS[@]}") @@ -2040,22 +2039,32 @@ install_packages() fi fi - [[ $INSTALL_WMS =~ dwm ]] && inpkg+=('git make gcc pkgconf') [[ $NEWSHELL == 'zsh' ]] && inpkg+=('zsh-completions') [[ $NEWSHELL =~ (bash|zsh) ]] && inpkg+=('bash-completion') + [[ $INSTALL_WMS =~ dwm ]] && inpkg+=('git' 'make' 'gcc' 'pkgconf') # remove the packages we don't want on the installed system [[ ${rmpkg[*]} ]] && chrun "pacman -Rnsc ${rmpkg[*]} --noconfirm" [[ -e $MNT/boot/${UCODE}.img ]] && rm -rf "$MNT/boot/${UCODE}.img" - # install crucial packages first to avoid issues, reinstalling iputils fixes network issues for non-root users + # install crucial packages first to avoid issues + # reinstalling iputils fixes network issues for non-root users chrun "pacman -S $KERNEL $UCODE iputils --noconfirm" 2> "$ERR" 2>&1 errshow 1 "chrun 'pacman -S $KERNEL $UCODE iputils --noconfirm'" # install the packages chosen throughout the install plus any extras added - chrun "pacman -S ${inpkg[*]} $NEWSHELL --needed --noconfirm" 2> "$ERR" 2>&1 - errshow 1 "chrun 'pacman -S ${inpkg[*]} $NEWSHELL --needed --noconfirm'" + # check that packages were trying to install are available, slow as shit + # but I'm done doing this manually every time the arch repos change + for pkg in "${inpkg[@]}"; do + if pacman -Qq $pkg >/dev/null 2>&1 || pacman -Ssq "^$pkg$" >/dev/null 2>&1; then + goodinpkg+=("$pkg") + else + echo "package missing or no longer available: $pkg -- ignoring" + fi + done + chrun "pacman -S ${goodinpkg[*]} --needed --noconfirm" 2> "$ERR" 2>&1 + errshow 1 "chrun 'pacman -S ${goodinpkg[*]} --needed --noconfirm'" # bootloader packages if [[ $BOOTLDR == 'grub' ]]; then @@ -2077,6 +2086,9 @@ install_packages() chrun "pacman -S ${KERNEL}-headers virtualbox-guest-utils virtualbox-guest-dkms --needed --noconfirm" fi + chrun "pacman -Syyu --noconfirm" 2> "$ERR" 2>&1 + errshow 1 "chrun 'pacman -Syyu --noconfirm'" + return 0 } @@ -2215,7 +2227,7 @@ install_mirrorlist() if hash reflector > /dev/null 2>&1; then if [[ $AUTO_MIRROR ]]; then reflector --verbose --connection-timeout 2 --threads 10 \ - --latest 150 --age 24 --score 75 --sort rate --fastest 6 --save /etc/pacman.d/mirrorlist + --latest 200 --age 24 --score 75 --sort rate --fastest 6 --save /etc/pacman.d/mirrorlist else reflector --verbose --connection-timeout 2 --threads 10 "${MIRROR_COUNTRY[@]}" \ --latest 100 --age 24 --score 50 --sort rate --fastest 6 --save /etc/pacman.d/mirrorlist @@ -3284,7 +3296,9 @@ errshow() local txt txt="\nCommand: $cmd\n\n$(errmsg)\n\n" tput cnorm + if (( fatal )); then + read -re -p $'\nAn error occurred.. Press [Enter] when ready to continue to error dialog' dialog --backtitle "$DIST Installer - $SYS - v$VER" --title " Install Error " --yes-label "Abort" --no-label "Continue" \ --yesno "${txt}Errors at this stage must be fixed before the install can continue.\n$_errchoice\n" 0 0 || return 0 [[ -r $DBG && $TERM == 'linux' ]] && less "$DBG"