1 |
On Mon, 20 Mar 2017 10:49:40 +0100 |
2 |
Ulrich Mueller <ulm@g.o> wrote: |
3 |
|
4 |
> >>>>> On Mon, 20 Mar 2017, Mike Frysinger wrote: |
5 |
> |
6 |
> > obvious NAK until you sort out the open questions already raised |
7 |
> > about the backwards breaking change you're trying to land in PMS. |
8 |
> |
9 |
> There are indeed some PMS patches pending about DISTDIR, FILESDIR, |
10 |
> WORKDIR, and S, but I fail to see where they would break backwards |
11 |
> compatibility. |
12 |
> |
13 |
> If you look at the last council approved PMS version [1], you'll find |
14 |
> that DISTDIR and FILESDIR are only valid in src_* phases and are not |
15 |
> guaranteed to have a consistent value across phases. The problem with |
16 |
> this is that it would not allow assignment of the PATCHES array in |
17 |
> global scope, e.g.: |
18 |
> |
19 |
> PATCHES=( "${DISTDIR}"/foo.patch "${WORKDIR}"/bar.patch ) |
20 |
> |
21 |
> After the PMS change, we will have the same properties for DISTDIR, |
22 |
> FILESDIR, WORKDIR, and S. Namely: |
23 |
> |
24 |
> - All four variables will be valid in src_* phases and in global scope |
25 |
> - They will have a consistent value in the ebuild environment |
26 |
> - The actual directories must not be accessed in global scope |
27 |
> |
28 |
> One could argue that this was overseen when EAPI 6 was approved. |
29 |
> In any case, ebuilds will be able to rely on more things than before. |
30 |
|
31 |
Please correct me if I'm wrong, but then portage's behavior of sending |
32 |
empty FILESDIR when it should not be used is wrong after that, right ? |
33 |
|
34 |
The idea behind FILESDIR being valid only in src_* phases is to allow |
35 |
portage-tree-less binpkgs to work. Not sure if that's even possible |
36 |
right now, but that is definitely a desirable goal. |
37 |
|
38 |
If I understand correctly, the change you mention would mean FILESDIR |
39 |
will be "constant". Which is good since that'd avoid regenerating the |
40 |
environment. However, this breaks autoconf ebuild relying on FILESDIR |
41 |
being empty when invalid and this would trigger the 'source |
42 |
$FILESDIR/... || die' part making the ebuild die in global scope. |
43 |
|
44 |
There are probably simpler fixes than the proposed patches, but this |
45 |
does indeed raise the question whether this is a backwards breaking |
46 |
change or not. |
47 |
|
48 |
Alexis. |