Gentoo Archives: gentoo-dev

From: "Marty E. Plummer" <hanetzer@×××××××××.com>
To: gentoo-dev@l.g.o
Cc: "Marty E. Plummer" <hanetzer@×××××××××.com>
Subject: [gentoo-dev] [PATCH] linux-info.eclass: enable EAPI 7
Date: Wed, 11 Jul 2018 02:04:15
Message-Id: 20180711020245.8054-1-hanetzer@startmail.com
1 versionator is banned in EAPI 7, so switch to either native EAPI 7
2 version functions or inherit eapi7-ver on EAPI 0-6
3 ---
4 eclass/linux-info.eclass | 9 +++++----
5 1 file changed, 5 insertions(+), 4 deletions(-)
6
7 diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
8 index 77df7a6ad60..96f94e4072a 100644
9 --- a/eclass/linux-info.eclass
10 +++ b/eclass/linux-info.eclass
11 @@ -106,7 +106,8 @@
12 # KBUILD_OUTPUT is used. This should be used for referencing .config.
13
14 # And to ensure all the weirdness with crosscompile
15 -inherit toolchain-funcs versionator
16 +inherit toolchain-funcs
17 +[[ ${EAPI:-0} == [0123456] ]] && inherit eapi7-ver
18
19 EXPORT_FUNCTIONS pkg_setup
20
21 @@ -634,9 +635,9 @@ get_running_version() {
22 # This handles a variety of weird kernel versions. Make sure to update
23 # tests/linux-info_get_running_version.sh if you want to change this.
24 local kv_full=${KV_FULL//[-+_]*}
25 - KV_MAJOR=$(get_version_component_range 1 ${kv_full})
26 - KV_MINOR=$(get_version_component_range 2 ${kv_full})
27 - KV_PATCH=$(get_version_component_range 3 ${kv_full})
28 + KV_MAJOR=$(ver_cut 1 ${kv_full})
29 + KV_MINOR=$(ver_cut 2 ${kv_full})
30 + KV_PATCH=$(ver_cut 3 ${kv_full})
31 KV_EXTRA="${KV_FULL#${KV_MAJOR}.${KV_MINOR}${KV_PATCH:+.${KV_PATCH}}}"
32 : ${KV_PATCH:=0}
33 fi
34 --
35 2.18.0