From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 593C1158086 for ; Mon, 15 Nov 2021 03:35:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C41E9E089A; Mon, 15 Nov 2021 03:35:13 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 68084E089A for ; Mon, 15 Nov 2021 03:35:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4E6DA342B20 for ; Mon, 15 Nov 2021 03:35:10 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4EB401C8 for ; Mon, 15 Nov 2021 03:35:07 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1636939489.c790b6e2c5bd4841a7469bdd8f6e3eee8bf82453.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_determineargs.sh gen_funcs.sh X-VCS-Directories: / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: c790b6e2c5bd4841a7469bdd8f6e3eee8bf82453 X-VCS-Branch: master Date: Mon, 15 Nov 2021 03:35:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: afb5cc19-42fa-454f-ae9c-43e0890980e0 X-Archives-Hash: 3957164cfe51bbcef410ec42b97e2a77 commit: c790b6e2c5bd4841a7469bdd8f6e3eee8bf82453 Author: Thomas Deutschmann gentoo org> AuthorDate: Mon Nov 15 00:19:31 2021 +0000 Commit: Thomas Deutschmann gentoo 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 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