From d5ee59790ee8298b8599b0aa0fa21a98b972a44d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 30 Jun 2024 08:00:51 +0100 Subject: gentoo auto-resync : 30:06:2024 - 08:00:50 --- .../linux-firmware/linux-firmware-99999999.ebuild | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'sys-kernel/linux-firmware/linux-firmware-99999999.ebuild') diff --git a/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild b/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild index 26c21e80395e..cbf74c22e3a1 100644 --- a/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild +++ b/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild @@ -84,7 +84,15 @@ pkg_setup() { } 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 } src_unpack() { @@ -375,7 +383,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() { @@ -393,21 +401,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 } -- cgit v1.2.3