>>>>> On Mon, 20 Mar 2017, Alexis Ballier wrote:

>> 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

> 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 ?

No. "Consistent" only means that it has a constant value when it is
defined, namely in src_* functions and in global scope.

> 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.

Obviously the FILESDIR variable cannot be empty in global scope if
PATCHES=("${FILESDIR}"/foo.patch) is supposed to work in EAPI 6.

> 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.

The spec will change from "not consistent" to "consistent" across
phases. Where "not consistent" meant that ebuilds could not rely on
the variable having the same value. I did *not* imply that ebuilds
could rely on the variable having a different value in each phase.

Ulrich

Attachment: pgp8CF_rBRxcS.pgp
Description: PGP signature

Reply via email to