Build a failed initramfs again, and don't offer a reboot until it builds
When mkinitcpio fails during an update or install, run it once more. If that fails too, say why (a full /boot, a hook or module that isn't installed) and don't offer a reboot. The install now logs its upgrade and checks the build before finish-install offers one, and nvidia.sh's rebuild no longer stops the install. A failed build is carried into the next update's log, so it's rebuilt and checked until it builds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -32,8 +32,7 @@ sudo pacman -Sy --needed --noconfirm archlinux-keyring || STATUS=1
|
||||
# script(1) keeps pacman's progress bars while logging its output for the
|
||||
# initramfs check
|
||||
echo "Updating Arch..."
|
||||
mkdir -p "$(dirname "$PACMAN_UPDATE_LOG")"
|
||||
: > "$PACMAN_UPDATE_LOG"
|
||||
new_pacman_log
|
||||
|
||||
# Run pacman -Su with the options given, adding its output to the log
|
||||
upgrade() {
|
||||
@@ -90,11 +89,6 @@ retry_upgrade() {
|
||||
|
||||
upgrade --noconfirm || retry_upgrade || STATUS=1
|
||||
|
||||
if initramfs_build_failed; then
|
||||
echo -e "\e[31mRebuilding the initramfs failed. Don't reboot until it's fixed - see the output above or $PACMAN_UPDATE_LOG.\e[0m"
|
||||
STATUS=1
|
||||
fi
|
||||
|
||||
echo "Checking for new packages..."
|
||||
install_packages "${SYSTEM_UTILS[@]}" || STATUS=1
|
||||
install_packages "${DEV_TOOLS[@]}" || STATUS=1
|
||||
@@ -103,4 +97,7 @@ install_packages "${DESKTOP[@]}" || STATUS=1
|
||||
install_packages "${MEDIA[@]}" || STATUS=1
|
||||
install_packages "${FONTS[@]}" || STATUS=1
|
||||
|
||||
# After the packages above, in case the build needed one of them
|
||||
check_initramfs || STATUS=1
|
||||
|
||||
exit $STATUS
|
||||
|
||||
Reference in New Issue
Block a user