Gentoo Archives: gentoo-dev

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH v2 1/2] kernel-2.eclass: Replace bit-shift arithmetic by ver_test
Date: Sat, 28 Aug 2021 05:52:49
Message-Id: uo89iw1y1@gentoo.org
In Reply to: [gentoo-dev] [PATCH v2 1/2] kernel-2.eclass: Replace bit-shift arithmetic by ver_test by "Ulrich Müller"
1 > + ver_test \
2 > + "${KV_MAJOR:-0}.${KV_MINOR:-0}.${KV_PATCH:-0}" \
3 > + "${operator}" \
4 > + "${1:-${KV_MAJOR:-0}}.${2:-${KV_MINOR:-0}}.${3:-${KV_PATCH:-0}}"
5
6 I've added fallbacks to 0, because it turns out that these components
7 can be empty.
8
9 There may also be a problem in detect_version().
10 For gentoo-sources-5.10.52 I get:
11
12 KV_MAJOR=5
13 KV_MINOR=10
14 KV_PATCH=52
15
16 but for git-sources-5.14_rc7:
17
18 KV_MAJOR=5
19 KV_MINOR= # empty
20 KV_PATCH=14
21
22 According to a comment in detect_version() the intended behaviour is
23 "if KV_MAJOR >= 3, then we have no more KV_MINOR" but looks like that
24 isn't always happening.
25
26 Ulrich

Attachments

File name MIME type
signature.asc application/pgp-signature