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 AD3951581C1 for ; Wed, 3 Jul 2024 15:43:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 41CB6E2B01; Wed, 3 Jul 2024 15:43:14 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D2212E2AF2 for ; Wed, 3 Jul 2024 15:43:13 +0000 (UTC) From: =?UTF-8?q?Ulrich=20M=C3=BCller?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Ulrich=20M=C3=BCller?= Subject: [gentoo-dev] [PATCH v2 2/4] linux-info.eclass: Drop support for EAPI 6 Date: Wed, 3 Jul 2024 17:42:50 +0200 Message-ID: <20240703154252.9471-2-ulm@gentoo.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240703154252.9471-1-ulm@gentoo.org> References: <20240703154252.9471-1-ulm@gentoo.org> 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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: b35a4711-bbe4-4ddd-9865-aff6723c20e5 X-Archives-Hash: 6387bf6a76dce0b2768526c16c673051 Signed-off-by: Ulrich Müller --- eclass/linux-info.eclass | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass index 90982445fdab..154be2a46888 100644 --- a/eclass/linux-info.eclass +++ b/eclass/linux-info.eclass @@ -6,7 +6,7 @@ # kernel@gentoo.org # @AUTHOR: # Original author: John Mylchreest -# @SUPPORTED_EAPIS: 6 7 8 +# @SUPPORTED_EAPIS: 7 8 # @BLURB: eclass used for accessing kernel related information # @DESCRIPTION: # This eclass is used as a central eclass for accessing kernel @@ -28,7 +28,7 @@ # get_running_version case ${EAPI} in - 6|7|8) ;; + 7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac @@ -38,7 +38,6 @@ _LINUX_INFO_ECLASS=1 # A Couple of env vars are available to effect usage of this eclass # These are as follows: - # @ECLASS_VARIABLE: CHECKCONFIG_DONOTHING # @USER_VARIABLE # @DEFAULT_UNSET @@ -51,7 +50,7 @@ _LINUX_INFO_ECLASS=1 # @DESCRIPTION: # A string containing the directory of the target kernel sources. The default value is # "/usr/src/linux" -KERNEL_DIR="${KERNEL_DIR:-${ROOT%/}/usr/src/linux}" +KERNEL_DIR="${KERNEL_DIR:-${ROOT}/usr/src/linux}" # @ECLASS_VARIABLE: CONFIG_CHECK # @DEFAULT_UNSET @@ -88,7 +87,6 @@ KERNEL_DIR="${KERNEL_DIR:-${ROOT%/}/usr/src/linux}" # CONFIG_CHECK="~CFG" with ERROR_="Error Message" calls eerror without dying # CONFIG_CHECK="~CFG" with WARNING_="Warning Message" calls ewarn without dying - # @ECLASS_VARIABLE: KBUILD_OUTPUT # @DEFAULT_UNSET # @DESCRIPTION: @@ -168,7 +166,6 @@ KERNEL_DIR="${KERNEL_DIR:-${ROOT%/}/usr/src/linux}" # And to ensure all the weirdness with crosscompile inherit toolchain-funcs -[[ ${EAPI} == 6 ]] && inherit eapi7-ver # @FUNCTION: set_arch_to_kernel # @DESCRIPTION: @@ -636,7 +633,7 @@ get_version() { # caught before this if they are. if [[ -z ${OUTPUT_DIR} ]] ; then # Try to locate a kernel that is most relevant for us. - for OUTPUT_DIR in "${SYSROOT}" "${ROOT%/}" "" ; do + for OUTPUT_DIR in "${SYSROOT}" "${ROOT}" "" ; do OUTPUT_DIR+="/lib/modules/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}${KV_LOCAL}/build" if [[ -e ${OUTPUT_DIR} ]] ; then break @@ -664,10 +661,10 @@ get_running_version() { local kv=$(uname -r) - if [[ -f ${ROOT%/}/lib/modules/${kv}/source/Makefile ]]; then - KERNEL_DIR=$(readlink -f "${ROOT%/}/lib/modules/${kv}/source") - if [[ -f ${ROOT%/}/lib/modules/${kv}/build/Makefile ]]; then - KBUILD_OUTPUT=$(readlink -f "${ROOT%/}/lib/modules/${kv}/build") + if [[ -f ${ROOT}/lib/modules/${kv}/source/Makefile ]]; then + KERNEL_DIR=$(readlink -f "${ROOT}/lib/modules/${kv}/source") + if [[ -f ${ROOT}/lib/modules/${kv}/build/Makefile ]]; then + KBUILD_OUTPUT=$(readlink -f "${ROOT}/lib/modules/${kv}/build") fi get_version && return 0 fi @@ -712,7 +709,6 @@ linux-info_get_any_version() { fi } - # ebuild check functions # --------------------------------------- -- 2.45.2