Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: David Michael <fedora.dm0@×××××.com>
Cc: gentoo-dev@l.g.o, base-system@g.o
Subject: Re: [gentoo-dev] [PATCH] fcaps.eclass: support EAPI 8
Date: Thu, 17 Jun 2021 10:10:58
Message-Id: upmwk7qe8@gentoo.org
In Reply to: [gentoo-dev] [PATCH] fcaps.eclass: support EAPI 8 by David Michael
1 >>>>> On Thu, 17 Jun 2021, David Michael wrote:
2
3 > @@ -33,15 +34,12 @@ _FCAPS_ECLASS=1
4 >
5 > IUSE="+filecaps"
6 >
7 > -# Since it is needed in pkg_postinst() it must be in RDEPEND
8 > +# Since it is needed in pkg_postinst() it must be in IDEPEND
9 > case "${EAPI:-0}" in
10 > - [0-6])
11 > - RDEPEND="filecaps? ( sys-libs/libcap )"
12 > - ;;
13 > - *)
14 > - BDEPEND="filecaps? ( sys-libs/libcap )"
15 > - RDEPEND="${BDEPEND}"
16 > - ;;
17 > + 7) BDEPEND="filecaps? ( sys-libs/libcap )" ;&
18
19 This is ill-defined in old EAPIs (5 and before), so the case statement
20 may fail. You cannot use ;& in global scope of an eclass.
21
22 Why not just change * to 7, and add a new case for 8? It's one
23 additional line, and IMHO would be better readable than having a
24 fallthrough.
25
26 > + 6) RDEPEND="filecaps? ( sys-libs/libcap )" ;;
27 > + 8) IDEPEND="filecaps? ( sys-libs/libcap )" ;;
28 > + *) die "EAPI ${EAPI:-0} is unsupported" ;;
29 > esac
30 >
31 > # @ECLASS-VARIABLE: FILECAPS
32
33 Ulrich

Attachments

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

Replies

Subject Author
Re: [gentoo-dev] [PATCH] fcaps.eclass: support EAPI 8 "Michał Górny" <mgorny@g.o>