Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] virtualx.eclass: Support EAPI-8
Date: Mon, 19 Jul 2021 05:57:24
Message-Id: 2ebd4a21eb2267d4a1b384d2ed6361c8417dcf6f.camel@gentoo.org
In Reply to: [gentoo-dev] [PATCH] virtualx.eclass: Support EAPI-8 by Andreas Sturmlechner
1 On Sun, 2021-07-18 at 22:46 +0200, Andreas Sturmlechner wrote:
2 > Standardise include guard, fix minor typo.
3 >
4 > Signed-off-by: Andreas Sturmlechner <asturm@g.o>
5 > ---
6 > eclass/virtualx.eclass | 13 ++++++-------
7 > 1 file changed, 6 insertions(+), 7 deletions(-)
8 >
9 > diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
10 > index ca52e8d2815..f362327cf77 100644
11 > --- a/eclass/virtualx.eclass
12 > +++ b/eclass/virtualx.eclass
13 > @@ -6,17 +6,16 @@
14 > # x11@g.o
15 > # @AUTHOR:
16 > # Original author: Martin Schlemmer <azarah@g.o>
17 > -# @SUPPORTED_EAPIS: 6 7
18 > -# @BLURB: This eclass can be used for packages that needs a working X environment to build.
19 > +# @SUPPORTED_EAPIS: 6 7 8
20 > +# @BLURB: This eclass can be used for packages that need a working X environment to build.
21 >
22 > case ${EAPI:-0} in
23 > - [0-5]) die "virtualx.eclass: EAPI ${EAPI} is too old." ;;
24 > - 6|7) ;;
25 > - *) die "virtualx.eclass: EAPI ${EAPI} is not supported yet." ;;
26 > + 6|7|8) ;;
27 > + *) die "virtualx.eclass: EAPI ${EAPI:-0} is not supported." ;;
28 > esac
29 >
30 > -if [[ ! ${_VIRTUAL_X} ]]; then
31 > -_VIRTUAL_X=1
32 > +if [[ ! ${_VIRTUAL_X_ECLASS} ]]; then
33 > +_VIRTUAL_X_ECLASS=1
34 >
35 > # @ECLASS-VARIABLE: VIRTUALX_REQUIRED
36 > # @PRE_INHERIT
37
38 Things to consider changing:
39
40 1. The dual-function of VIRTUALX_DEPEND is ugly (and I don't think it
41 meets global variable invariancy requirements; not that the assignment
42 variant is used anywhere).
43
44 2. Maybe VIRTUALX_DEPEND can be exported conditionally to
45 VIRTUALX_REQUIRED!=always, to avoid some mistakes.
46
47 3. The eclass is leaving stray BDEPEND in global scope in EAPI 6.
48
49 --
50 Best regards,
51 Michał Górny