Open g4s8 opened 1 year ago
Leaving the system in a half updated state is actually worse.
This is part of the kernel hook, maybe further kernel hooks could be skipped, but not for any other packages.
Moved to https://github.com/void-linux/void-packages since this is not really an xbps issue, but something that may be improved in https://github.com/void-linux/void-packages/blob/7e0dde51308b921d7eb143ca3f84828f6d2ac82a/srcpkgs/xbps-triggers/files/kernel-hooks.
Issues become stale 90 days after last activity and are closed 14 days after that. If this issue is still relevant bump it or assign it.
@classabbyamp @Duncaen I added exit 1
to kernel-hook in #43852 and tested any hook fails parent hook script (with debug logs), but the problem is still here - the hook script fails but xbps successfully install or reconfigure the package:
Executing post-install kernel hook: 20-initramfs ...
dracut-install: ERROR: installing '/boot/volume1.key'
dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.da3HNp/initramfs -a /boot/volume1.key /etc/crypttab
cp: cannot create regular file 'boot/initramfs-6.2.13_1.img': No such file or directory
dracut: Creation of boot/initramfs-6.2.13_1.img failed
DEBUG: !!! hook etc/kernel.d/post-install/20-initramfs failed
linux6.2-6.2.13_1: configured successfully.
I think a better fix for your specific problem is checking in the grub
hook that both the kernel and initramfs for the specified $VERSION
exist and, if not, don't run grub-mkconfig
.
The problem: I updated kernel version, it successfully generated initramfs using drakut and copied kernel vmlinuz file to boot partition but failed to copy initramfs due to "No space left on device" error. Then xbps continued to execute configuration hooks and generated new grub config. Grub has found vmlinux file for new kernel, so it generated new entry for this version. But during boot initramfs was not found, so boot failed with kernel panic.
I'm suggesting to stop configuration execution if any hook fails and skip other hooks to avoid it.
xbps log: