Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Fri, 13 Jul 2018 22:09:52
Message-Id: 1531519709.c6b150836dfef848e51ec2cce801b12daf2c77b1.whissi@gentoo
1 commit: c6b150836dfef848e51ec2cce801b12daf2c77b1
2 Author: Marty E. Plummer <hanetzer <AT> startmail <DOT> com>
3 AuthorDate: Fri Jul 13 22:05:41 2018 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 13 22:08:29 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6b15083
7
8 linux-info.eclass: use eapi7-ver
9
10 versionator is banned in EAPI 7, so switch to either native EAPI 7
11 version functions or inherit eapi7-ver on EAPI 0-6.
12
13 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
14
15 eclass/linux-info.eclass | 9 +++++----
16 1 file changed, 5 insertions(+), 4 deletions(-)
17
18 diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
19 index 77df7a6ad60..96f94e4072a 100644
20 --- a/eclass/linux-info.eclass
21 +++ b/eclass/linux-info.eclass
22 @@ -106,7 +106,8 @@
23 # KBUILD_OUTPUT is used. This should be used for referencing .config.
24
25 # And to ensure all the weirdness with crosscompile
26 -inherit toolchain-funcs versionator
27 +inherit toolchain-funcs
28 +[[ ${EAPI:-0} == [0123456] ]] && inherit eapi7-ver
29
30 EXPORT_FUNCTIONS pkg_setup
31
32 @@ -634,9 +635,9 @@ get_running_version() {
33 # This handles a variety of weird kernel versions. Make sure to update
34 # tests/linux-info_get_running_version.sh if you want to change this.
35 local kv_full=${KV_FULL//[-+_]*}
36 - KV_MAJOR=$(get_version_component_range 1 ${kv_full})
37 - KV_MINOR=$(get_version_component_range 2 ${kv_full})
38 - KV_PATCH=$(get_version_component_range 3 ${kv_full})
39 + KV_MAJOR=$(ver_cut 1 ${kv_full})
40 + KV_MINOR=$(ver_cut 2 ${kv_full})
41 + KV_PATCH=$(ver_cut 3 ${kv_full})
42 KV_EXTRA="${KV_FULL#${KV_MAJOR}.${KV_MINOR}${KV_PATCH:+.${KV_PATCH}}}"
43 : ${KV_PATCH:=0}
44 fi