(trying to have people understand the idea, not to discuss in this
thread)

On Fri, 2009-03-13 at 06:18 +1300, Alistair Bush wrote:

> > As long as we want/have to support PMs lacking EAPI detection in
> > '*.ebuild' to mask ebuilds with unknown EAPI, each approach to add EAPI
> > to an '*.ebuild' must be hackish. So we can try to find the least ugly
> > hack, or we need to change the extension.

> >    inherit eapi 4
> > 
> > Because non-compliant PM's already quit because of (missing or dying)
> > eapi.eclass, there is no need to have a '4.eclass'.
> 
> How would the 4.eclass determine whether the package manager actually 
> supports the eapi?
> 
> inherit is a function remember so any "special" parsing will not change 
> the fact the the inherit function will be called.
> Will then need to determine whether there is actually a PM that doesn't 
> support the eclasses EAPI and then die.

The most important point here I thought everyone is aware of:
inherit() is a function provided *by* PM - or am I wrong here?

So it already *knows* to handle the 'eapi' argument as special when the
PM is compliant, to not read *any* eclass for this one inherit-call when
the ebuild gets sourced (assuming selected eapi specifies to
shell-source the ebuild).
And non-compliant PMs would mask the ebuild 'by corruption', because of
either missing or globalscope-dying eapi.eclass, whatever can be made
look more obvious to the user.

> What are the implications of calling inherit multiple times within an 
> ebuild?

A compliant PM does allow this if the selected eapi specifies to inherit
eclasses, a non-compliant PM will not come to a subsequent inherit call
after 'inherit eapi'.

> Im sorry,  but this just sounds like a HACK, and a hacky hack at that.

Agreed (see above).
Again - the only reason for this idea is to eventually allow for keeping
the '.ebuild' extension, because EAPI 0 does not allow for specifying
*any* eapi at all. It just forces PM to provide inherit() as the only
PM-defined global-scope function. So whatever we try, specifying an eapi
inside an .ebuild *without* changing the extension *will* be a hack,
just more ore less ugly.

/haubi/
-- 
Michael Haubenwallner
Gentoo on a different level


Reply via email to