public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Steve Long <slong@rathaus.eclipse.co.uk>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev]  Re: EAPI-2 and src_configure in eclasses
Date: Tue, 07 Oct 2008 16:49:30 +0100	[thread overview]
Message-ID: <gcg126$95h$1@ger.gmane.org> (raw)
In-Reply-To: 20081005170740.4a067aef@gentoo.org

Alexis Ballier wrote:

> Indeed; different names could be given to different implementations of
> the same thing, but that might completely kill the point of abstracting
> it.
> Maybe eclasses should die on unknown eapi; the fact is I really hate the
> current way it's done when switching an ebuild to EAPI-2 which uses
> an eclass that exports src_compile; most eclasses don't special case
> eapi-2 yet and we end up running econf twice at best. I fear that'll be
> the same with eapi-3, eapi-4, etc. (supposing that they'll support
> src_configure too)
> 
>> > An EXPORT_FUNCTIONS ignoring any function its doesn't know for its
>> > eapi would help too.
>> 
> Ciaran McCreesh <ciaran.mccreesh@googlemail.com> wrote:
>> An EXPORT_FUNCTIONS ignoring incorrect usage makes one less place
>> checking for eclass screwups...
> 
> yes; that's just a matter of choice though, but for eclasses it's
> probably not luxury.
> 
Well it's simple enough to check (and give a QA warning) for unknown
functions; adding a check for a specific string prefix (or to exclude a
certain subset) in EXPORT_FUNCTIONS (based on current EAPI) is simple
enough too. Is that what you mean?

The behaviour to trigger could change eg for debug mode, or a repoman check.

I don't quite see how that deals with an eclass calling econf in its
exported src_compile? Seems like EAPI versioning for eclasses (with
implicit 0 only) is more what you're after for that issue (so the PM could
suppress src_configure if src_compile is going to resolve to an EAPI-0
eclass function, although the inheritance stack might prove problematic.)

Having to die for an unsupported EAPI seems like the wrong approach; if it's
not going to work the PM shouldn't source it. If it can be made to work by
filtering certain functions, that's doable.

In the worst case, an ebuild switching to EAPI will require eclass
maintenance; this is where the separation of elibs (useful code) and
eclasses (template ebuilds) would be useful, although that needs versioning
too.





  parent reply	other threads:[~2008-10-07 16:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-05 13:36 [gentoo-dev] EAPI-2 and src_configure in eclasses Ulrich Mueller
2008-10-05 14:07 ` Ciaran McCreesh
2008-10-05 14:15   ` Alexis Ballier
2008-10-05 14:24     ` Ciaran McCreesh
2008-10-05 15:07       ` Alexis Ballier
2008-10-05 15:17         ` Ciaran McCreesh
2008-10-05 17:11           ` Zac Medico
2008-10-05 20:03             ` Ciaran McCreesh
2008-10-05 20:24               ` Zac Medico
2008-10-07 15:49         ` Steve Long [this message]
2008-10-09  8:26           ` [gentoo-dev] " Alexis Ballier
2008-10-10  7:17             ` Alec Warner
2008-10-10 12:41               ` Duncan
2008-10-10 16:06                 ` Alec Warner
2008-10-05 15:38     ` [gentoo-dev] " Ulrich Mueller
2008-10-05 15:41       ` Ciaran McCreesh
2008-10-07 16:07         ` [gentoo-dev] " Steve Long
2008-10-07 16:33           ` Ciaran McCreesh
2008-10-08 18:48             ` [gentoo-dev] [project] " Steve Long
2008-10-08  3:21           ` [gentoo-dev] " Brian Harring

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='gcg126$95h$1@ger.gmane.org' \
    --to=slong@rathaus.eclipse.co.uk \
    --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