Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Tobias Klausmann <klausman@g.o>
Subject: Re: The fallacies of GLEP55
Date: Sat, 16 May 2009 11:27:10 +0200
Hi! 

On Fri, 15 May 2009, Ciaran McCreesh wrote:
> > eval `grep '^EAPI=' ebuildfile | head -n 1`
> > 
> > will set EAPI in the current scope to EAPI in the ebuild, without
> > sourcing it, unless the issue with something like this would be its
> > use of grep and head, but these are both in the system set, so unless
> > you don't want to depend on the system set, I don't know what the
> > objection would be.
> 
> The objection is that your code doesn't work. It's entirely legal to
> do, say:
> 
>     export EAPI="1"

Change the spec, then. Or aren't we talking about
writing/changing/clarifying a spec right now? I mean... yes,
ebuilds are actually bash scripts. But I don't see a problem with
using a subset of what's allowed for *this* *specific* line. 

Actually, I personally would prefer taking it out of the
parsed-by-bash part entirely. Add it as a shebang-like line at
the top:

#EAPI-1

as the first or second line. Allowing it on the second line
allows you to later bolt on a true shebang-line if you should so
desire. Only having to look at the first two lines makes finding
it out easier (note that I don't call that parsing on purpose).

> or:
> 
>     inherit versionator
> 
>     if version_is_at_least 2 ; then
>         EAPI="2"
>     else
>         EAPI="0"
>     fi

I was under the impression that it's illegal to change/set the
EAPI after using inherit.

Regards,
Tobias

-- 
Found on a small utility knife in MIT's lab supply:
"Caution.  Blade is sharp.  Keep out of children."


Replies:
Re: The fallacies of GLEP55
-- Ciaran McCreesh
Re: The fallacies of GLEP55
-- Duncan
References:
The fallacies of GLEP55
-- Patrick Lauer
Re: The fallacies of GLEP55
-- Ben de Groot
Re: The fallacies of GLEP55
-- Peter Alfredsen
Re: The fallacies of GLEP55
-- William Hubbs
Re: The fallacies of GLEP55
-- Ciaran McCreesh
Re: The fallacies of GLEP55
-- William Hubbs
Re: The fallacies of GLEP55
-- Ciaran McCreesh
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: The fallacies of GLEP55
Next by thread:
Re: The fallacies of GLEP55
Previous by date:
Re: Re: Can we stop wasting time and bandwidth? (was: The fallacies of GLEP55)
Next by date:
Re: The fallacies of GLEP55


Updated Jun 17, 2009

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.