Gentoo Archives: gentoo-dev

From: Mike Gilbert <floppym@g.o>
To: Gentoo Dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] [PATCH] systemd.eclass: set BDEPEND for EAPI 7
Date: Mon, 06 Aug 2018 19:51:48
Message-Id: CAJ0EP43LQscOmZ3A0bB=YtmJp=WbezYffLhcQgwH0KQu-C2mVg@mail.gmail.com
In Reply to: Re: [gentoo-dev] [PATCH] systemd.eclass: set BDEPEND for EAPI 7 by "Vadim A. Misbakh-Soloviov"
1 On Mon, Aug 6, 2018 at 3:35 PM Vadim A. Misbakh-Soloviov
2 <gentoo@×××.name> wrote:
3 >
4 > В письме от понедельник, 6 августа 2018 г. 22:13:49 MSK пользователь Ulrich
5 > Mueller написал:
6 > > >>>>> On Mon, 6 Aug 2018, Mike Gilbert wrote:
7 > > > -DEPEND="virtual/pkgconfig"
8 > > > +if [[ ${EAPI} == [0123456] ]]; then
9 > >
10 > > This should use ${EAPI:-0} because for EAPI 0 the variable can be
11 > > empty.
12 > >
13 > > > + DEPEND="virtual/pkgconfig"
14 > > > +else
15 > > > + BDEPEND="virtual/pkgconfig"
16 > > > +fi
17 >
18 > And how about "-le"/"-lt"/"-ge"/"-gt"/"-eq" syntax?
19 > Or even ((EAPI<7))?
20 > Are they forbidden to use in eclasses?
21
22 If I recall correctly, EAPI values are not required to be numeric, and
23 are not required to increase in any predictable manner. They only do
24 so by convention.
25
26 > Anyway, I think, it is possible to add something like "EAPI=${EAPI:-0}"
27 > somewhere at the top of eclass, to don't call "${EAPI:-0}" each time when EAPI
28 > variable is needed.
29
30 Re-assigning EAPI within an eclass seems like a bad idea to me.
31
32 A better solution would be to ban ebuilds with no defined EAPI, but
33 that's outside the scope of this patch.

Replies

Subject Author
Re: [gentoo-dev] [PATCH] systemd.eclass: set BDEPEND for EAPI 7 Alec Warner <antarus@g.o>