From: Michael Haubenwallner <haubi@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] A new glep: Ebuild format and metadata handling
Date: Wed, 03 Jun 2009 12:02:28 +0200 [thread overview]
Message-ID: <1244023348.1633.93.camel@salomon-22> (raw)
In-Reply-To: <200905311556.19190.patrick@gentoo.org>
On Sun, 2009-05-31 at 15:56 +0200, Patrick Lauer wrote:
Thank you for collecting this up!
> parsers: The current practise of putting the eapi definition near the top of
> the ebuild, combined with the need to state it for all non-EAPI0 ebuilds,
> suggests that it can be parsed without having to source the ebuild.
Would it improve parsers' performance to explicitly define EAPI="0" in
EAPI0 ebuilds too, so it always can find an EAPI value?
> "haubi"
> He proposes to use an eapi.eclass and define eapi as a function.
Erm, unlike earlier I did not propose eapi as a function this time.
Instead, my proposal is identical to the "parsers" one, but with a
backwards compatible syntax for defining the EAPI value that allows to
have non-parsing PMs (nearly) silently ignore the ebuild, so we do not
have to wait another extended period (=year) to put "parsed" EAPI values
in the tree after a "parsing" PM became stable.
This backwards compatibility syntax is done with the eapi.eclass, which
does nothing but early exit when inherit'ed by an old (=non-parsing) PM.
It is up to the "parsing" PM (the PMS) if 'eapi.eclass' actually gets
read in, as the implementation of 'inherit' is part of the PM and has to
detect "eapi" as special argument anyway, otherways it would fail to
find "4.eclass" when used this way:
> inherit eapi 4
But I can also think of this syntax:
EAPI="4" # parsers read this line only
inherit eapi # compat for non-parsing PM only
Here the 'inherit eapi' line can be dropped as soon as we do not need to
support non-parsing PMs any more. However, parsing PMs either need to
ignore "eapi" as argument to 'inherit', or need to inform eapi.eclass
somehow that the EAPI was parsed already.
There might be a better name than 'eapi.eclass' here. With
'eapicompat.eclass' fex this would read:
EAPI="4"
inherit eapicompat
Thanks!
/haubi/
--
Michael Haubenwallner
Gentoo on a different level
prev parent reply other threads:[~2009-06-03 10:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-31 13:56 [gentoo-dev] A new glep: Ebuild format and metadata handling Patrick Lauer
2009-05-31 22:09 ` Richard Freeman
2009-06-04 0:52 ` Wyatt Epp
2009-06-04 1:03 ` Nirbheek Chauhan
2009-06-01 10:35 ` Thilo Bangert
2009-06-01 15:26 ` Markos Chandras
2009-06-01 15:49 ` Nirbheek Chauhan
2009-06-03 10:02 ` Michael Haubenwallner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1244023348.1633.93.camel@salomon-22 \
--to=haubi@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox