From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1187980-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 81CF3138359 for <garchives@archives.gentoo.org>; Thu, 16 Jul 2020 18:36:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BC646E07C5; Thu, 16 Jul 2020 18:36:52 +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 9FE2BE07C5 for <gentoo-commits@lists.gentoo.org>; Thu, 16 Jul 2020 18:36:52 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 B96FE34EE58 for <gentoo-commits@lists.gentoo.org>; Thu, 16 Jul 2020 18:36:51 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5C90A2D3 for <gentoo-commits@lists.gentoo.org>; Thu, 16 Jul 2020 18:36:50 +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: <1594916419.2192d8130e11d5aeca1d49c02f76edca5e96895c.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: 2192d8130e11d5aeca1d49c02f76edca5e96895c X-VCS-Branch: master Date: Thu, 16 Jul 2020 18:36:50 +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: 405e6b59-f41d-4b3e-a6f0-8813c5b453d4 X-Archives-Hash: 3c62ad3a31db3d513fb978523b66590f commit: 2192d8130e11d5aeca1d49c02f76edca5e96895c Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> AuthorDate: Thu Jul 16 16:20:19 2020 +0000 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> CommitDate: Thu Jul 16 16:20:19 2020 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=2192d813 gen_configkernel.sh: config_kernel(): Ensure that CONFIG_INITRAMFS_SOURCE is always unset config_kernel() runs only once. For this run, even when --integrated-initramfs is set, the kernel option CONFIG_INITRAMFS_SOURCE should be unset *when* we are also tasked to create an initramfs. Otherwise, functions like set_initramfs_compression_method() can fail when used kernel config had integrated initramfs but new kernel doesn't. Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> gen_configkernel.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gen_configkernel.sh b/gen_configkernel.sh index b76d1b7..ba6d401 100755 --- a/gen_configkernel.sh +++ b/gen_configkernel.sh @@ -348,17 +348,17 @@ config_kernel() { kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_UNIX98_PTYS" "y" \ && required_kernel_options+=( 'CONFIG_UNIX98_PTYS' ) - # --integrated-initramfs handling - if isTrue "${INTEGRATED_INITRAMFS}" + # Make sure that CONFIG_INITRAMFS_SOURCE is unset so we don't clash + # with any other genkernel functionality. + local cfg_CONFIG_INITRAMFS_SOURCE=$(kconfig_get_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_INITRAMFS_SOURCE") + if [[ -n "${cfg_CONFIG_INITRAMFS_SOURCE}" && ${#cfg_CONFIG_INITRAMFS_SOURCE} -gt 2 ]] then - local cfg_CONFIG_INITRAMFS_SOURCE=$(kconfig_get_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_INITRAMFS_SOURCE") - if [[ -n "${cfg_CONFIG_INITRAMFS_SOURCE}" && ${#cfg_CONFIG_INITRAMFS_SOURCE} -gt 2 ]] - then - # Checking value length to allow 'CONFIG_INITRAMFS_SOURCE=' and 'CONFIG_INITRAMFS_SOURCE=""' - print_info 2 "$(get_indent 1)>> CONFIG_INITRAMFS_SOURCE is already set; Unsetting to avoid clashing with --integrated-initramfs ..." - kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_INITRAMFS_SOURCE" "" - fi - elif isTrue "${COMPRESS_INITRD}" + # Checking value length to allow 'CONFIG_INITRAMFS_SOURCE=' and 'CONFIG_INITRAMFS_SOURCE=""' + print_info 2 "$(get_indent 1)>> CONFIG_INITRAMFS_SOURCE is set; Unsetting to avoid problems ..." + kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_INITRAMFS_SOURCE" "" + fi + + if isTrue "${COMPRESS_INITRD}" then set_initramfs_compression_method "${KERNEL_OUTPUTDIR}/.config" fi