Gentoo Archives: gentoo-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: [PATCH v2] eapi7-ver.eclass: Support EAPIs 0 to 6.
Date: Wed, 09 May 2018 00:27:40
Message-Id: pan$45f3e$b8c91af$7c827945$33f54fb5@cox.net
In Reply to: [gentoo-dev] [PATCH v2] eapi7-ver.eclass: Support EAPIs 0 to 6. by "Ulrich Müller"
1 Ulrich Müller posted on Tue, 08 May 2018 21:39:16 +0200 as excerpted:
2
3 > # @ECLASS: eapi7-ver.eclass
4 > @@ -58,12 +58,8 @@ # the version string, it is truncated silently.
5 >
6 > case ${EAPI:-0} in
7 > - 0|1|2|3|4|5)
8 > - die "${ECLASS}: EAPI=${EAPI:-0} not supported";;
9 > - 6)
10 > - ;;
11 > - *)
12 > - die "${ECLASS}: EAPI=${EAPI} includes all functions from this eclass";;
13 > + 0|1|2|3|4|5|6) ;;
14 > + *) die "${ECLASS}: EAPI=${EAPI} includes all functions from this eclass" ;;
15 > esac
16 >
17
18 You're simply continuing what was there before, but since you're working on
19 it already...
20
21 That generic *) case die claim is incorrectly specific for a generic catchall
22 case.
23
24 I'd suggest a 7) case with that specific claim, and an "EAPI Unknown" die
25 error for the generic *) catchall case. The error is then clearer if someone
26 typos EAPI=67 or the like.
27
28 + 0|1|2|3|4|5|6) ;;
29 + 7) die "${ECLASS}: EAPI=${EAPI} includes all functions from this eclass" ;;
30 + *) die "${ECLASS}: EAPI=${EAPI} Unknown" ;;
31
32 --
33 Duncan - List replies preferred. No HTML msgs.
34 "Every nonfree program has a lord, a master --
35 and if you use the program, he is your master." Richard Stallman