From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1581360-garchives=archives.gentoo.org@lists.gentoo.org>
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 C02F7158015
	for <garchives@archives.gentoo.org>; Mon, 18 Dec 2023 17:21:45 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 6C0BA2BC018;
	Mon, 18 Dec 2023 17:21:44 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 456372BC018
	for <gentoo-commits@lists.gentoo.org>; Mon, 18 Dec 2023 17:21:44 +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) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 185DA335D75
	for <gentoo-commits@lists.gentoo.org>; Mon, 18 Dec 2023 17:21:43 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 846821338
	for <gentoo-commits@lists.gentoo.org>; Mon, 18 Dec 2023 17:21:41 +0000 (UTC)
From: "WANG Xuerui" <xen0n@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, "WANG Xuerui" <xen0n@gentoo.org>
Message-ID: <1702920049.ef4219fbf06a27fec86a85a6e4470fc0182fe862.xen0n@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
X-VCS-Repository: repo/gentoo
X-VCS-Files: eclass/kernel-build.eclass
X-VCS-Directories: eclass/
X-VCS-Committer: xen0n
X-VCS-Committer-Name: WANG Xuerui
X-VCS-Revision: ef4219fbf06a27fec86a85a6e4470fc0182fe862
X-VCS-Branch: master
Date: Mon, 18 Dec 2023 17:21:41 +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: 56036795-6ef7-4037-b064-662fc2ab0fa6
X-Archives-Hash: 607440eb6d11f5772b2fc7fdb07bb74e

commit:     ef4219fbf06a27fec86a85a6e4470fc0182fe862
Author:     WANG Xuerui <xen0n <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 15 09:43:16 2023 +0000
Commit:     WANG Xuerui <xen0n <AT> gentoo <DOT> org>
CommitDate: Mon Dec 18 17:20:49 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef4219fb

kernel-build.eclass: ensure KERNEL_EFI_ZBOOT is probed in all cases

The several partially-supported arches (those relying on
USE=savedconfig) directly return in src_prepare(), hence previously the
CONFIG_EFI_ZBOOT probing didn't have a chance to run when building for
those arches, leading to wrong kernel artifact path and failed
src_install().

Move the probing to near the end of eclass src_configure(), so the flag
correctly reflects the reality in all circumstances.

Signed-off-by: WANG Xuerui <xen0n <AT> gentoo.org>

 eclass/kernel-build.eclass | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 6b692dc4f9a0..7a041a8aacdf 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -203,6 +203,12 @@ kernel-build_src_configure() {
 			.config)
 	fi
 
+	# If this is set by USE=secureboot or user config this will have an effect
+	# on the name of the output image. Set this variable to track this setting.
+	if grep -q "CONFIG_EFI_ZBOOT=y" .config; then
+		KERNEL_EFI_ZBOOT=1
+	fi
+
 	mkdir -p "${WORKDIR}"/modprep || die
 	mv .config "${WORKDIR}"/modprep/ || die
 	emake O="${WORKDIR}"/modprep "${MAKEARGS[@]}" olddefconfig
@@ -456,12 +462,6 @@ kernel-build_merge_configs() {
 
 	./scripts/kconfig/merge_config.sh -m -r \
 		.config "${merge_configs[@]}"  || die
-
-	# If this is set by USE=secureboot or user config this will have an effect
-	# on the name of the output image. Set this variable to track this setting.
-	if grep -q "CONFIG_EFI_ZBOOT=y" .config; then
-		KERNEL_EFI_ZBOOT=1
-	fi
 }
 
 fi