summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Ammerlaan <andrewammerlaan@gentoo.org>2024-06-25 16:36:46 +0200
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2024-06-29 10:36:22 +0200
commit8da5d5cc4ed7a090c83b9f99577c31365c6884da (patch)
tree8608abe665243b1ab797d87dd2caedca88eedc47 /sys-firmware
parentsys-kernel/linux-firmware: complain less when /boot is not mounted (diff)
downloadgentoo-8da5d5cc4ed7a090c83b9f99577c31365c6884da.tar.gz
gentoo-8da5d5cc4ed7a090c83b9f99577c31365c6884da.tar.bz2
gentoo-8da5d5cc4ed7a090c83b9f99577c31365c6884da.zip
sys-firmware/intel-microcode: complain less when /boot is not mounted
When using dist-kernel users can correct the problem and then emerge --config ... Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/37292 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'sys-firmware')
-rw-r--r--sys-firmware/intel-microcode/intel-microcode-20240312_p20240312.ebuild21
-rw-r--r--sys-firmware/intel-microcode/intel-microcode-20240514_p20240514.ebuild21
-rw-r--r--sys-firmware/intel-microcode/intel-microcode-20240531_p20240526-r1.ebuild21
3 files changed, 45 insertions, 18 deletions
diff --git a/sys-firmware/intel-microcode/intel-microcode-20240312_p20240312.ebuild b/sys-firmware/intel-microcode/intel-microcode-20240312_p20240312.ebuild
index 957da662f92e..5e2d305fc9ed 100644
--- a/sys-firmware/intel-microcode/intel-microcode-20240312_p20240312.ebuild
+++ b/sys-firmware/intel-microcode/intel-microcode-20240312_p20240312.ebuild
@@ -83,7 +83,15 @@ MICROCODE_SIGNATURES_DEFAULT=""
# exclude specific CPU: MICROCODE_SIGNATURES="-s !0x00000686"
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_prepare() {
@@ -181,7 +189,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
local _initramfs_file="${ED}/boot/intel-uc.img"
@@ -274,21 +282,22 @@ pkg_preinst() {
pkg_prerm() {
# Make sure /boot is mounted so that we can remove /boot/intel-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
}
pkg_postinst() {
- # 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
# We cannot give detailed information if user is affected or not:
diff --git a/sys-firmware/intel-microcode/intel-microcode-20240514_p20240514.ebuild b/sys-firmware/intel-microcode/intel-microcode-20240514_p20240514.ebuild
index 957da662f92e..5e2d305fc9ed 100644
--- a/sys-firmware/intel-microcode/intel-microcode-20240514_p20240514.ebuild
+++ b/sys-firmware/intel-microcode/intel-microcode-20240514_p20240514.ebuild
@@ -83,7 +83,15 @@ MICROCODE_SIGNATURES_DEFAULT=""
# exclude specific CPU: MICROCODE_SIGNATURES="-s !0x00000686"
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_prepare() {
@@ -181,7 +189,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
local _initramfs_file="${ED}/boot/intel-uc.img"
@@ -274,21 +282,22 @@ pkg_preinst() {
pkg_prerm() {
# Make sure /boot is mounted so that we can remove /boot/intel-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
}
pkg_postinst() {
- # 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
# We cannot give detailed information if user is affected or not:
diff --git a/sys-firmware/intel-microcode/intel-microcode-20240531_p20240526-r1.ebuild b/sys-firmware/intel-microcode/intel-microcode-20240531_p20240526-r1.ebuild
index 6ad9cfa826b6..55f66f30803d 100644
--- a/sys-firmware/intel-microcode/intel-microcode-20240531_p20240526-r1.ebuild
+++ b/sys-firmware/intel-microcode/intel-microcode-20240531_p20240526-r1.ebuild
@@ -83,7 +83,15 @@ MICROCODE_SIGNATURES_DEFAULT=""
# exclude specific CPU: MICROCODE_SIGNATURES="-s !0x00000686"
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_prepare() {
@@ -191,7 +199,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
local _initramfs_file="${ED}/boot/intel-uc.img"
@@ -284,21 +292,22 @@ pkg_preinst() {
pkg_prerm() {
# Make sure /boot is mounted so that we can remove /boot/intel-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
}
pkg_postinst() {
- # 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
# We cannot give detailed information if user is affected or not: