commit: c790b6e2c5bd4841a7469bdd8f6e3eee8bf82453
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 15 00:19:31 2021 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Nov 15 01:24:49 2021 +0000
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=c790b6e2
gen_determineargs.sh: determine_real_args(): Make kmod only required for
non-static kernels
Fixes: 153a877d ("Refactor (compressed) kernel module handling")
Bug: https://bugs.gentoo.org/821484
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
gen_determineargs.sh | 15 +++++++++------
gen_funcs.sh | 2 +-
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/gen_determineargs.sh b/gen_determineargs.sh
index 027c696..07b2202 100755
--- a/gen_determineargs.sh
+++ b/gen_determineargs.sh
@@ -314,12 +314,6 @@ determine_real_args() {
gen_die "'realpath -m /' failed. We need a realpath version
which supports '-m' mode!"
fi
- KMOD_CMD=$(which kmod 2>/dev/null)
- if [ -z "${KMOD_CMD}" ]
- then
- gen_die "kmod not found. Is sys-apps/kmod installed?"
- fi
-
if hash grep &>/dev/null
then
GREP_CMD=grep
@@ -1233,6 +1227,15 @@ determine_real_args() {
fi
fi
+ KMOD_CMD=$(which kmod 2>/dev/null)
+ if ! isTrue "${BUILD_STATIC}"
+ then
+ if [ -z "${KMOD_CMD}" ]
+ then
+ gen_die "kmod not found. Is sys-apps/kmod installed?"
+ fi
+ fi
+
if ! isTrue "${CMD_INSTALL}"
then
if [ -n "${KERNEL_MODULES_PREFIX}" ]
diff --git a/gen_funcs.sh b/gen_funcs.sh
index 6bc59e6..500caf2 100755
--- a/gen_funcs.sh
+++ b/gen_funcs.sh
@@ -322,7 +322,7 @@ is_kext_supported_by_kmod() {
is_supported=yes
break
fi
- done < <("${KMOD_CMD}" -V)
+ done < <("${KMOD_CMD}" -V 2>/dev/null)
;;
esac