diff options
Diffstat (limited to 'sys-kernel/linux-firmware/linux-firmware-20240610-r1.ebuild')
-rw-r--r-- | sys-kernel/linux-firmware/linux-firmware-20240610-r1.ebuild | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/sys-kernel/linux-firmware/linux-firmware-20240610-r1.ebuild b/sys-kernel/linux-firmware/linux-firmware-20240610-r1.ebuild index 32bd327957ea..9385d0d0c96e 100644 --- a/sys-kernel/linux-firmware/linux-firmware-20240610-r1.ebuild +++ b/sys-kernel/linux-firmware/linux-firmware-20240610-r1.ebuild @@ -69,7 +69,15 @@ QA_PREBUILT="*" PATCHES=( "${FILESDIR}"/${PN}-copy-firmware-r4.patch ) pkg_pretend() { - use initramfs && mount-boot_pkg_pretend + if use initramfs; then + if [[ -z ${ROOT} ]] && use dist-kernel; then + # Check, but don't die because we can fix the problem and then + # emerge --config ... to re-run installation. + nonfatal mount-boot_check_status + else + mount-boot_pkg_pretend + fi + fi } pkg_setup() { @@ -374,7 +382,7 @@ pkg_preinst() { fi # Make sure /boot is available if needed. - use initramfs && mount-boot_pkg_preinst + use initramfs && ! use dist-kernel && mount-boot_pkg_preinst } pkg_postinst() { @@ -392,21 +400,22 @@ pkg_postinst() { fi done - # Don't forget to umount /boot if it was previously mounted by us. if use initramfs; then if [[ -z ${ROOT} ]] && use dist-kernel; then dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}" + else + # Don't forget to umount /boot if it was previously mounted by us. + mount-boot_pkg_postinst fi - mount-boot_pkg_postinst fi } pkg_prerm() { # Make sure /boot is mounted so that we can remove /boot/amd-uc.img! - use initramfs && mount-boot_pkg_prerm + use initramfs && ! use dist-kernel && mount-boot_pkg_prerm } pkg_postrm() { # Don't forget to umount /boot if it was previously mounted by us. - use initramfs && mount-boot_pkg_postrm + use initramfs && ! use dist-kernel && mount-boot_pkg_postrm } |