1 |
There are kernel versions like 4.9.280, therefore shifting version |
2 |
components by 8 bits in kernel_is() may fail. |
3 |
|
4 |
Signed-off-by: Ulrich Müller <ulm@g.o> |
5 |
--- |
6 |
eclass/kernel-2.eclass | 9 +++++---- |
7 |
1 file changed, 5 insertions(+), 4 deletions(-) |
8 |
|
9 |
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass |
10 |
index 58e0bae94eee..1913942a679b 100644 |
11 |
--- a/eclass/kernel-2.eclass |
12 |
+++ b/eclass/kernel-2.eclass |
13 |
@@ -561,7 +561,7 @@ kernel_is() { |
14 |
unset v n |
15 |
|
16 |
# Now we can continue |
17 |
- local operator test value |
18 |
+ local operator |
19 |
|
20 |
case ${1#-} in |
21 |
lt) operator="-lt"; shift;; |
22 |
@@ -573,9 +573,10 @@ kernel_is() { |
23 |
esac |
24 |
[[ $# -gt 3 ]] && die "Error in kernel-2_kernel_is(): too many parameters" |
25 |
|
26 |
- : $(( test = (KV_MAJOR << 16) + (KV_MINOR << 8) + KV_PATCH )) |
27 |
- : $(( value = (${1:-${KV_MAJOR}} << 16) + (${2:-${KV_MINOR}} << 8) + ${3:-${KV_PATCH}} )) |
28 |
- [ ${test} ${operator} ${value} ] |
29 |
+ ver_test \ |
30 |
+ "${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" \ |
31 |
+ "${operator}" \ |
32 |
+ "${1:-${KV_MAJOR}}.${2:-${KV_MINOR}}.${3:-${KV_PATCH}}" |
33 |
} |
34 |
|
35 |
# Capture the sources type and set DEPENDs |
36 |
-- |
37 |
2.33.0 |