public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Ulrich Müller" <ulm@gentoo.org>
Subject: [gentoo-dev] [PATCH v2 2/4] linux-info.eclass: Drop support for EAPI 6
Date: Wed,  3 Jul 2024 17:42:50 +0200	[thread overview]
Message-ID: <20240703154252.9471-2-ulm@gentoo.org> (raw)
In-Reply-To: <20240703154252.9471-1-ulm@gentoo.org>

Signed-off-by: Ulrich Müller <ulm@gentoo.org>
---
 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 <johnm@gentoo.org>
-# @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_<CFG>="Error Message" calls eerror without dying
 # CONFIG_CHECK="~CFG" with WARNING_<CFG>="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



  reply	other threads:[~2024-07-03 15:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-01 21:36 [gentoo-dev] [PATCH 1/2] linux-info.eclass: Drop temporary fix for powerpc Ulrich Müller
2024-07-01 21:36 ` [gentoo-dev] [PATCH 2/2] linux-info.eclass: Drop support for EAPI 6 Ulrich Müller
2024-07-02  5:35 ` [gentoo-dev] [PATCH 1/2] linux-info.eclass: Drop temporary fix for powerpc Ionen Wolkens
2024-07-02  7:38   ` Ulrich Mueller
2024-07-03 15:42     ` [gentoo-dev] [PATCH v2 1/4] " Ulrich Müller
2024-07-03 15:42       ` Ulrich Müller [this message]
2024-07-03 15:42       ` [gentoo-dev] [PATCH v2 3/4] linux-info.eclass: Drop reference to BUILD_FIXES variable Ulrich Müller
2024-07-03 15:42       ` [gentoo-dev] [PATCH v2 4/4] kernel-2.eclass: " Ulrich Müller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240703154252.9471-2-ulm@gentoo.org \
    --to=ulm@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox