diff options
author | Ulrich Müller <ulm@gentoo.org> | 2021-08-27 20:05:46 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2021-08-27 20:05:46 +0200 |
commit | f3772cf131333575eb40a527181a9f7e2760217b (patch) | |
tree | d2dc4b10760f143b92669a206283d67af552190c /eclass/linux-info.eclass | |
parent | www-apps/nextcloud: Bump to version 22.1.1 (diff) | |
download | gentoo-f3772cf131333575eb40a527181a9f7e2760217b.tar.gz gentoo-f3772cf131333575eb40a527181a9f7e2760217b.tar.bz2 gentoo-f3772cf131333575eb40a527181a9f7e2760217b.zip |
Revert "linux-info.eclass: Replace bit-shift arithmetic by ver_test"
This reverts commit 4b48b038fa23b5580fa2b916b34c646c155db93a.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'eclass/linux-info.eclass')
-rw-r--r-- | eclass/linux-info.eclass | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass index 5456d6be02eb..124fb70e78ad 100644 --- a/eclass/linux-info.eclass +++ b/eclass/linux-info.eclass @@ -395,7 +395,7 @@ kernel_is() { linux-info_get_any_version # Now we can continue - local operator + local operator test value case ${1#-} in lt) operator="-lt"; shift;; @@ -407,10 +407,9 @@ kernel_is() { esac [[ $# -gt 3 ]] && die "Error in kernel-2_kernel_is(): too many parameters" - ver_test \ - "${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" \ - "${operator}" \ - "${1:-${KV_MAJOR}}.${2:-${KV_MINOR}}.${3:-${KV_PATCH}}" + : $(( test = (KV_MAJOR << 16) + (KV_MINOR << 8) + KV_PATCH )) + : $(( value = (${1:-${KV_MAJOR}} << 16) + (${2:-${KV_MINOR}} << 8) + ${3:-${KV_PATCH}} )) + [ ${test} ${operator} ${value} ] } get_localversion() { |