linux-info.eclass: use eapi7-ver
authorMarty E. Plummer <hanetzer@startmail.com>
Fri, 13 Jul 2018 22:05:41 +0000 (00:05 +0200)
committerThomas Deutschmann <whissi@gentoo.org>
Fri, 13 Jul 2018 22:08:29 +0000 (00:08 +0200)
versionator is banned in EAPI 7, so switch to either native EAPI 7
version functions or inherit eapi7-ver on EAPI 0-6.

Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
eclass/linux-info.eclass

index 77df7a6ad609ddb25dd939f77a1f0d0e2201a3e4..96f94e4072ae59d83eba0500f275543d1ee66508 100644 (file)
 # KBUILD_OUTPUT is used. This should be used for referencing .config.
 
 # And to ensure all the weirdness with crosscompile
-inherit toolchain-funcs versionator
+inherit toolchain-funcs
+[[ ${EAPI:-0} == [0123456] ]] && inherit eapi7-ver
 
 EXPORT_FUNCTIONS pkg_setup
 
@@ -634,9 +635,9 @@ get_running_version() {
                # This handles a variety of weird kernel versions.  Make sure to update
                # tests/linux-info_get_running_version.sh if you want to change this.
                local kv_full=${KV_FULL//[-+_]*}
-               KV_MAJOR=$(get_version_component_range 1 ${kv_full})
-               KV_MINOR=$(get_version_component_range 2 ${kv_full})
-               KV_PATCH=$(get_version_component_range 3 ${kv_full})
+               KV_MAJOR=$(ver_cut 1 ${kv_full})
+               KV_MINOR=$(ver_cut 2 ${kv_full})
+               KV_PATCH=$(ver_cut 3 ${kv_full})
                KV_EXTRA="${KV_FULL#${KV_MAJOR}.${KV_MINOR}${KV_PATCH:+.${KV_PATCH}}}"
                : ${KV_PATCH:=0}
        fi