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