Gentoo Archives: gentoo-dev

From: Sam James <sam@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] flag-o-matic.eclass: get rid of eutils in <EAPI-8, fix eclassdoc, make some funcs internal
Date: Thu, 01 Apr 2021 21:58:04
Message-Id: AAAB0232-727A-4E13-B080-061C0E1D223F@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH] flag-o-matic.eclass: get rid of eutils in by Ulrich Mueller
1 > On 31 Mar 2021, at 10:09, Ulrich Mueller <ulm@g.o> wrote:
2 >
3 >>>>>> On Wed, 31 Mar 2021, Andreas Sturmlechner wrote:
4 >
5 >> setup-allowed-flags() {
6 >> + [[ ${EAPI} == [0-7] ]] ||
7 >> + die "Internal function ${FUNCNAME} is not available in >=EAPI-8."
8 >> + _setup-allowed-flags
9 >> +}
10 >
11 > Strictly speaking, EAPIs are strings, so numeric comparison is not
12 > meaningful. Suggestion: "... is not available in EAPI ${EAPI}."
13
14 That’s a reason to not do arithmetic comparison in e.g. Bash, but >= refers
15 to age/chronological order here, which isn’t a problem.
16
17 >
18 >> test-flag-PROG() {
19 >> + [[ ${EAPI} == [0-7] ]] ||
20 >> + die "Internal function ${FUNCNAME} is not available in >=EAPI-8."
21 >> + _test-flag-PROG
22 >> +}
23 >
24 >> test-flags-PROG() {
25 >> + [[ ${EAPI} == [0-7] ]] ||
26 >> + die "Internal function ${FUNCNAME} is not available in >=EAPI-8."
27 >> + _test-flags-PROG
28 >> +}
29 >
30 > Same for these.
31 >
32 > Ulrich

Attachments

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