Use the newly-introduced mount-boot.eclass nonfatal support to amend the error message with the instruction to run 'emerge --config' rather than rebuild the whole kernel.
Signed-off-by: Michał Górny <[email protected]> --- eclass/kernel-install.eclass | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass index e826626e13f2..bcbb0f1c8574 100644 --- a/eclass/kernel-install.eclass +++ b/eclass/kernel-install.eclass @@ -403,7 +403,15 @@ kernel-install_pkg_postinst() { debug-print-function ${FUNCNAME} "${@}" if [[ -z ${ROOT} ]]; then - mount-boot_pkg_preinst + if ! nonfatal mount-boot_check_status; then + eerror + eerror "The kernel files were copied to disk successfully but the kernel" + eerror "was not deployed. Once you resolve the problems, please run" + eerror "the equivalent of the following command to install it:" + eerror + eerror " emerge --config ${CATEGORY}/${PN}" + die "Kernel install failed, please mount /boot and run emerge --config ${CATEGORY}/${PN}" + fi local ver="${PV}${KV_LOCALVERSION}" local image_path=$(kernel-install_get_image_path) @@ -455,7 +463,7 @@ kernel-install_pkg_postrm() { kernel-install_pkg_config() { [[ -z ${ROOT} ]] || die "ROOT!=/ not supported currently" - mount-boot_pkg_preinst + mount-boot_check_status local ver="${PV}${KV_LOCALVERSION}" local image_path=$(kernel-install_get_image_path) -- 2.30.0
