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 35F271581FB for ; Fri, 30 Aug 2024 19:09:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 13A8EE29B0; Fri, 30 Aug 2024 19:09:06 +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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A0EF7E29AD for ; Fri, 30 Aug 2024 19:09:05 +0000 (UTC) From: Andrew Ammerlaan To: gentoo-dev@lists.gentoo.org Cc: Andrew Ammerlaan Subject: [gentoo-dev] [PATCH] kernel-build.eclass: adjust missing .config error messages Date: Fri, 30 Aug 2024 21:08:58 +0200 Message-ID: <20240830190858.14876-1-andrewammerlaan@gentoo.org> X-Mailer: git-send-email 2.46.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: c8ff3300-4e89-4801-abbd-37fad662c308 X-Archives-Hash: 8a628b42dd5b943475cc4f34f9cc6a54 kernel-build_merge_configs should always be called first nowadays because it applies the savedconfig. Signed-off-by: Andrew Ammerlaan Closes: https://github.com/gentoo/gentoo/pull/38345 Signed-off-by: Andrew Ammerlaan --- eclass/kernel-build.eclass | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass index be02920162f4..d92076d61c04 100644 --- a/eclass/kernel-build.eclass +++ b/eclass/kernel-build.eclass @@ -243,7 +243,7 @@ kernel-build_src_configure() { MAKEARGS+=( KBZIP2="lbzip2" ) fi - [[ -f .config ]] || die "Ebuild error: please copy default config into .config" + [[ -f .config ]] || die "Ebuild error: No .config, kernel-build_merge_configs was not called." if [[ -z "${KV_LOCALVERSION}" ]]; then KV_LOCALVERSION=$(sed -n -e 's#^CONFIG_LOCALVERSION="\(.*\)"$#\1#p' \ @@ -602,10 +602,13 @@ kernel-build_pkg_postinst() { # 3. Config saved via USE=savedconfig (if applicable). # 4. Module signing key specified via MODULES_SIGN_KEY* variables. # 5. User-supplied configs from ${BROOT}/etc/kernel/config.d/*.config. +# +# This function must be called by the ebuild in the src_prepare phase. kernel-build_merge_configs() { debug-print-function ${FUNCNAME} "${@}" - [[ -f .config ]] || die "${FUNCNAME}: .config does not exist" + [[ -f .config ]] || + die "${FUNCNAME}: No .config, please copy default config into .config" has .config "${@}" && die "${FUNCNAME}: do not specify .config as parameter" -- 2.46.0