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