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:
@@ -98,3 +98,29 @@ answer() {
|
||||
[[ "$output" != *"Reboot now?"* ]]
|
||||
not_called systemctl
|
||||
}
|
||||
|
||||
@test "finish-install doesn't offer a reboot while the initramfs doesn't build" {
|
||||
KERNEL=0.0.0-not-installed
|
||||
mkdir -p "$HOME/.local/state/coredesktop"
|
||||
printf '%s\n' "(3/4) Updating linux initcpios..." "==> ERROR: module not found: 'nvidia'" \
|
||||
> "$HOME/.local/state/coredesktop/pacman-update.log"
|
||||
stub systemctl
|
||||
answer y
|
||||
run bash "$REPO/system/finish-install.sh"
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" == *"CoreDesktop is installed."*"Don't reboot yet"*"Once it builds"* ]]
|
||||
[[ "$output" != *"Reboot now?"* ]]
|
||||
not_called systemctl
|
||||
}
|
||||
|
||||
@test "finish-install still offers configure while the initramfs doesn't build, if the kernel is current" {
|
||||
needs_modules
|
||||
ITEMS="to do core Federated Core"
|
||||
mkdir -p "$HOME/.local/state/coredesktop"
|
||||
printf '%s\n' "(3/4) Updating linux initcpios..." "==> ERROR: module not found: 'nvidia'" \
|
||||
> "$HOME/.local/state/coredesktop/pacman-update.log"
|
||||
run bash "$REPO/system/finish-install.sh"
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" == *"Don't reboot yet"*"configure connects"* ]]
|
||||
[[ "$output" != *"no reboot needed"* ]]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user