From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1080161-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id BAB30138334
	for <garchives@archives.gentoo.org>; Thu, 28 Mar 2019 23:43:24 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 4589BE0AF1;
	Thu, 28 Mar 2019 23:43:19 +0000 (UTC)
Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 1BB7EE0AF1
	for <gentoo-commits@lists.gentoo.org>; Thu, 28 Mar 2019 23:43:19 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id C0563335D15
	for <gentoo-commits@lists.gentoo.org>; Thu, 28 Mar 2019 23:43:17 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 996DE598
	for <gentoo-commits@lists.gentoo.org>; Thu, 28 Mar 2019 23:43:13 +0000 (UTC)
From: "Thomas Deutschmann" <whissi@gentoo.org>
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" <whissi@gentoo.org>
Message-ID: <1553815826.cb0d1ec77ef70df93db51ce4fe7b850b8a3ba59f.whissi@gentoo>
Subject: [gentoo-commits] proj/genkernel:master commit in: /
X-VCS-Repository: proj/genkernel
X-VCS-Files: gen_configkernel.sh
X-VCS-Directories: /
X-VCS-Committer: whissi
X-VCS-Committer-Name: Thomas Deutschmann
X-VCS-Revision: cb0d1ec77ef70df93db51ce4fe7b850b8a3ba59f
X-VCS-Branch: master
Date: Thu, 28 Mar 2019 23:43:13 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 46ee06a3-e18f-4ed7-bb3a-66ee4d3c7185
X-Archives-Hash: 1d38b58e70df6598f0c9d35a772751ca

commit:     cb0d1ec77ef70df93db51ce4fe7b850b8a3ba59f
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 28 23:30:26 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Mar 28 23:30:26 2019 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=cb0d1ec7

config_kernel(): Force --static and --no-ramdisk-modules

...if kernel doesn't support modules to avoid that genkernel will run
into errors when trying to call 'make modules' or expects to build
initramfs with modules when there aren't any modules.

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

 gen_configkernel.sh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/gen_configkernel.sh b/gen_configkernel.sh
index abc2f61..541a3a8 100755
--- a/gen_configkernel.sh
+++ b/gen_configkernel.sh
@@ -187,6 +187,21 @@ config_kernel() {
 	else
 		# no, we do NOT support modules, set 'y' for new stuff.
 		newcfg_setting='y'
+
+		if ! isTrue "${BUILD_STATIC}"
+		then
+			local _no_modules_support_warning="$(getIndent 1)>> Forcing --static "
+			if isTrue "${BUILD_RAMDISK}" && isTrue "${RAMDISKMODULES}"
+			then
+				_no_modules_support_warning+="and --no-ramdisk-modules "
+				RAMDISKMODULES="no"
+			fi
+
+			_no_modules_support_warning+="to avoid genkernel failures because kernel does NOT support modules..."
+
+			print_warning 1 "${_no_modules_support_warning}"
+			BUILD_STATIC="yes"
+		fi
 	fi
 
 	# If the user has configured DM as built-in, we need to respect that.