Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: EAPI conditional in eclasses (was: [PATCH v2 1/6] verify-sig.eclass: New eclass to verify OpenPGP sigs)
Date: Wed, 07 Oct 2020 08:15:05
Message-Id: u4kn6mozo_-_@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH v2 1/6] verify-sig.eclass: New eclass to verify OpenPGP sigs by William Hubbs
1 >>>>> On Tue, 06 Oct 2020, William Hubbs wrote:
2
3 >> +case "${EAPI:-0}" in
4 >> + 0|1|2|3|4|5|6)
5 >> + die "Unsupported EAPI=${EAPI} (obsolete) for ${ECLASS}"
6 >> + ;;
7 >> + 7)
8 >> + ;;
9 >> + *)
10 >> + die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
11 >> + ;;
12 >> +esac
13
14 > Does it really matter that an EAPI is unsupported because it is
15 > obsolete vs unknown? Can we simplify this case statement to the
16 > following or something similar for all of our eclasses?
17
18 > case "${EAPI:-0}" in
19 > 7)
20 > ;;
21 > *)
22 > die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
23 > ;;
24 > esac
25
26 I am with you there, at least for a new eclass that never supported
27 these old EAPIs.
28
29 It may be somewhat useful when removing existing support for an EAPI,
30 but even there things should be clear from context?
31
32 Ulrich

Attachments

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