commit:     86ce6816b789e707fa8348624b0643beeeb3c7eb
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 28 21:07:17 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Jul 29 20:00:26 2019 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=86ce6816

genkernel: Don't allow building kernel only when --kerncache is used but 
--no-install is set

This just don't make sense. We wouldn't do anything.

Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 genkernel | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/genkernel b/genkernel
index 31a880d..f33379c 100755
--- a/genkernel
+++ b/genkernel
@@ -188,6 +188,14 @@ then
        gen_kerncache_is_valid
 fi
 
+if isTrue "${KERNCACHE_IS_VALID}" && ! isTrue "${CMD_INSTALL}" && ! isTrue 
"${BUILD_RAMDISK}"
+then
+       error_msg="Nothing to do: Selected action does not include building 
initramfs."
+       error_msg+=" Because kerncache is valid, no kernel will be build."
+       error_msg+=" However, due to set --no-install option, we will not even 
install kernel binary from kerncache."
+       gen_die "${error_msg}"
+fi
+
 print_info 1 '' 1 0
 print_info 1 "Working with Linux kernel ${BOLD}${KV}${NORMAL} for 
${BOLD}${ARCH}${NORMAL}"
 print_info 1 "Using kernel config file '${KERNEL_CONFIG}' ..."

Reply via email to