Gentoo Archives: gentoo-pms

From: Ulrich Mueller <ulm@g.o>
To: gentoo-pms@l.g.o
Subject: Re: [gentoo-pms] EAPI specification in ebuilds
Date: Fri, 06 Apr 2012 21:25:23
In Reply to: Re: [gentoo-pms] EAPI specification in ebuilds by David Leverton
>>>>> On Fri, 6 Apr 2012, David Leverton wrote:
>> +It is an error for an ebuild to contain more than one \t{EAPI} assignment.
> Are package managers expected to enforce this in the parsing stage > (at least within the first 20 lines) or is it OK to stop reading as > soon as you see a valid EAPI= line (so any conflicting later > assignments would get caught by making sure the post-source EAPI > matches the parsed one,
I guess the pragmatic approach is that the package manager would stop reading when it encounters the first valid EAPI assignment (or after line 20, whatever occurs first). The sanity check is that the two EAPI values obtained by parsing and sourcing must agree. In theory this may leave some loopholes, i.e. it is possible to construct an ebuild that would be invalid by the wording of the spec but would be accepted as valid ebuild by the package manager. I don't think that this has any practical relevance though.
> but redundant assignments with the same EAPI would get through)?
Right, assigning the same EAPI twice would be an example for an ebuild that is invalid but accepted by the package manager. But would this cause any problems? Ulrich


Subject Author
Re: [gentoo-pms] EAPI specification in ebuilds David Leverton <levertond@××××××××××.com>