1 |
Use the newly-introduced mount-boot.eclass nonfatal support to amend |
2 |
the error message with the instruction to run 'emerge --config' rather |
3 |
than rebuild the whole kernel. |
4 |
|
5 |
Signed-off-by: Michał Górny <mgorny@g.o> |
6 |
--- |
7 |
eclass/kernel-install.eclass | 12 ++++++++++-- |
8 |
1 file changed, 10 insertions(+), 2 deletions(-) |
9 |
|
10 |
diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass |
11 |
index e826626e13f2..bcbb0f1c8574 100644 |
12 |
--- a/eclass/kernel-install.eclass |
13 |
+++ b/eclass/kernel-install.eclass |
14 |
@@ -403,7 +403,15 @@ kernel-install_pkg_postinst() { |
15 |
debug-print-function ${FUNCNAME} "${@}" |
16 |
|
17 |
if [[ -z ${ROOT} ]]; then |
18 |
- mount-boot_pkg_preinst |
19 |
+ if ! nonfatal mount-boot_check_status; then |
20 |
+ eerror |
21 |
+ eerror "The kernel files were copied to disk successfully but the kernel" |
22 |
+ eerror "was not deployed. Once you resolve the problems, please run" |
23 |
+ eerror "the equivalent of the following command to install it:" |
24 |
+ eerror |
25 |
+ eerror " emerge --config ${CATEGORY}/${PN}" |
26 |
+ die "Kernel install failed, please mount /boot and run emerge --config ${CATEGORY}/${PN}" |
27 |
+ fi |
28 |
|
29 |
local ver="${PV}${KV_LOCALVERSION}" |
30 |
local image_path=$(kernel-install_get_image_path) |
31 |
@@ -455,7 +463,7 @@ kernel-install_pkg_postrm() { |
32 |
kernel-install_pkg_config() { |
33 |
[[ -z ${ROOT} ]] || die "ROOT!=/ not supported currently" |
34 |
|
35 |
- mount-boot_pkg_preinst |
36 |
+ mount-boot_check_status |
37 |
|
38 |
local ver="${PV}${KV_LOCALVERSION}" |
39 |
local image_path=$(kernel-install_get_image_path) |
40 |
-- |
41 |
2.30.0 |