handle errors when installing pkgs; close

https://github.com/Chrysostomus/manjaro-architect/issues/117
merge-requests/273/head
Bernhard Landauer 7 years ago
parent 15d34d14fd
commit a8af133037

@ -256,6 +256,7 @@ _ExtErrBody="Partition cannot be mounted due to a problem with the mountpoint na
# Install Base
_WarnInstBase="A Manjaro Base has already been installed on this partition.\nProceed anyway?"
_InstBseTitle="Install Base"
_InstFail="Installation failed."
_InstBseBody="Standard: Recommended for beginners. Choose up to two kernels (linux and linux-lts) and optionally the base-devel package group. sudo, btrfs-progs, f2fs-tools will also be installed.\n\nAdvanced: Choose up to four kernels (linux, lts, grsec, zen) and control individual base and base-devel packages. Additional configuration for grsec and zen may be required for Virtualbox and NVIDIA.\n\nNOTE: Unless already installed, at least one kernel must be selected."
_InstStandBseBody="The base package group will be installed automatically. The base-devel package group is required to use the Arch User Repository (AUR)."
_InstStandBase="Standard Installation"

@ -279,7 +279,7 @@ install_base() {
filter_packages
check_for_error "packages to install: $(cat /mnt/.base | tr '\n' ' ')"
basestrap ${MOUNTPOINT} $(cat /mnt/.base) 2>$ERR
check_for_error "install basepkgs" $?
check_for_error "install basepkgs" $? || return 1
# If root is on btrfs volume, amend mkinitcpio.conf
[[ $(lsblk -lno FSTYPE,MOUNTPOINT | awk '/ \/mnt$/ {print $1}') == btrfs ]] && sed -e '/^HOOKS=/s/\ fsck//g' -i ${MOUNTPOINT}/etc/mkinitcpio.conf && \
@ -341,7 +341,7 @@ uefi_bootloader() {
DIALOG " $_InstUefiBtTitle " --yesno "\n$_InstUefiBtBody\n " 0 0 || return 0
clear
basestrap ${MOUNTPOINT} grub efibootmgr dosfstools 2>$ERR
check_for_error "$FUNCNAME grub" $?
check_for_error "$FUNCNAME grub" $? || return 1
DIALOG " $_InstGrub " --infobox "\n$_PlsWaitBody\n " 0 0
# if root is encrypted, amend /etc/default/grub
@ -416,7 +416,7 @@ bios_bootloader() {
if [[ $(cat ${PACKAGES}) != "" ]]; then
sed -i 's/+ \|\"//g' ${PACKAGES}
basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>$ERR
check_for_error "$FUNCNAME" $?
check_for_error "$FUNCNAME" $? || return 1
# If Grub, select device
if [[ $(cat ${PACKAGES} | grep "grub") != "" ]]; then

@ -149,7 +149,7 @@ install_manjaro_de_wm() {
check_for_error "packages to install: $(cat /mnt/.base | sort | uniq | tr '\n' ' ')"
clear
basestrap ${MOUNTPOINT} $(cat /mnt/.base | sort | uniq) 2>$ERR
check_for_error "install desktop-pkgs" "$?"
check_for_error "install desktop-pkgs" "$?" || return 1
# copy the profile overlay to the new root
echo "Copying overlay files to the new root"
@ -180,7 +180,6 @@ install_manjaro_de_wm() {
# Clear the packages file for installation of "common" packages
echo "" > ${PACKAGES}
# Offer to install various "common" packages.
install_extra
fi

@ -111,11 +111,13 @@ install_base_menu() {
check_for_error 'refresh pacman-keys'
)
;;
"3") install_base
"3") install_base || DIALOG " $_InstBseTitle " --infobox "\n$_InstFail\n " 0 0
;;
"4") check_base && install_manjaro_de_wm_pkg
"4") check_base && {
install_manjaro_de_wm_pkg || DIALOG " $_InstBseTitle " --infobox "\n$_InstFail\n " 0 0
}
;;
"5") install_bootloader
"5") install_bootloader || DIALOG " $_InstBseTitle " --infobox "\n$_InstFail\n " 0 0
;;
*) loopmenu=0
return 0

Loading…
Cancel
Save