summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Ammerlaan <andrewammerlaan@gentoo.org>2024-06-25 16:15:05 +0200
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2024-06-29 10:36:20 +0200
commit594a6613a4693a590ba8473a99ce1fd6c4d506d2 (patch)
tree1028bec89747d66060af4ef9547082e933ea9e80 /eclass/linux-mod-r1.eclass
parentkernel-install.eclass: move mount-boot check to dist-kernel-utils.eclass (diff)
downloadgentoo-594a6613a4693a590ba8473a99ce1fd6c4d506d2.tar.gz
gentoo-594a6613a4693a590ba8473a99ce1fd6c4d506d2.tar.bz2
gentoo-594a6613a4693a590ba8473a99ce1fd6c4d506d2.zip
linux-mod-r1.eclass: check /boot if we are re-installing dist-kernel
Previous commit already adds the check when we call dist-kernel_reinstall_initramfs, but lets do it a bit earlier as well. As in dist-kernel-utils.eclass, make the check nonfatal because when users notice the problem they can correct it and manually re-install the kernel via emerge --config ... We don't have a pkg_pretend phase in this eclass, so we use the pkg_setup phase instead to avoid introducing a new phase here. Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'eclass/linux-mod-r1.eclass')
-rw-r--r--eclass/linux-mod-r1.eclass13
1 files changed, 12 insertions, 1 deletions
diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
index 43c5a7d7b140..9911a6ddee12 100644
--- a/eclass/linux-mod-r1.eclass
+++ b/eclass/linux-mod-r1.eclass
@@ -132,6 +132,7 @@ IDEPEND="
"
if [[ ${MODULES_INITRAMFS_IUSE} ]]; then
+ inherit mount-boot-utils
IUSE+=" ${MODULES_INITRAMFS_IUSE}"
IDEPEND+="
${MODULES_INITRAMFS_IUSE#+}? (
@@ -328,9 +329,19 @@ fi
# 3. perform various sanity checks to fail early on issues
linux-mod-r1_pkg_setup() {
debug-print-function ${FUNCNAME[0]} "${@}"
- [[ ${MERGE_TYPE} != binary ]] || return 0
_MODULES_GLOBAL[ran:pkg_setup]=1
_modules_check_function ${#} 0 0 || return 0
+
+ if [[ -z ${ROOT} && ${MODULES_INITRAMFS_IUSE} ]] &&
+ use dist-kernel && use ${MODULES_INITRAMFS_IUSE#+}
+ 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
+ fi
+
+ [[ ${MERGE_TYPE} != binary ]] || return 0
+
_modules_check_migration
_modules_prepare_kernel