1 |
>>>>> On Mon, 20 Mar 2017, Alexis Ballier wrote: |
2 |
|
3 |
>> After the PMS change, we will have the same properties for DISTDIR, |
4 |
>> FILESDIR, WORKDIR, and S. Namely: |
5 |
>> |
6 |
>> - All four variables will be valid in src_* phases and in global scope |
7 |
>> - They will have a consistent value in the ebuild environment |
8 |
>> - The actual directories must not be accessed in global scope |
9 |
|
10 |
> Please correct me if I'm wrong, but then portage's behavior of |
11 |
> sending empty FILESDIR when it should not be used is wrong after |
12 |
> that, right ? |
13 |
|
14 |
No. "Consistent" only means that it has a constant value when it is |
15 |
defined, namely in src_* functions and in global scope. |
16 |
|
17 |
> The idea behind FILESDIR being valid only in src_* phases is to |
18 |
> allow portage-tree-less binpkgs to work. Not sure if that's even |
19 |
> possible right now, but that is definitely a desirable goal. |
20 |
|
21 |
> If I understand correctly, the change you mention would mean |
22 |
> FILESDIR will be "constant". Which is good since that'd avoid |
23 |
> regenerating the environment. However, this breaks autoconf ebuild |
24 |
> relying on FILESDIR being empty when invalid and this would trigger |
25 |
> the 'source $FILESDIR/... || die' part making the ebuild die in |
26 |
> global scope. |
27 |
|
28 |
Obviously the FILESDIR variable cannot be empty in global scope if |
29 |
PATCHES=("${FILESDIR}"/foo.patch) is supposed to work in EAPI 6. |
30 |
|
31 |
> There are probably simpler fixes than the proposed patches, but this |
32 |
> does indeed raise the question whether this is a backwards breaking |
33 |
> change or not. |
34 |
|
35 |
The spec will change from "not consistent" to "consistent" across |
36 |
phases. Where "not consistent" meant that ebuilds could not rely on |
37 |
the variable having the same value. I did *not* imply that ebuilds |
38 |
could rely on the variable having a different value in each phase. |
39 |
|
40 |
Ulrich |