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-pms
Navigation:
Lists: gentoo-pms: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-pms@g.o
From: Ulrich Mueller <ulm@g.o>
Subject: Re: EAPI specification in ebuilds
Date: Sun, 13 May 2012 21:00:17 +0200
>>>>> On Sun, 13 May 2012, David Leverton wrote:

> Apologies for not noticing these sooner, but now that I come to 
> implement it...

>> +\begin{verbatim}
>> +^[ \t]*EAPI=(['"]?)([A-Za-z0-9+_.-]*)\1[ \t]*(#.*)?$
>> +\end{verbatim}

> 1) Should an empty value be allowed here?

That was the intention, because the spec says that an empty value is
equivalent to 0.

> 2) If there's a trailing comment it needs to have at least one 
> whitespace between it and the end of the value:

>      [dleverton@shiny-one pms] $ EAPI=123#foo
>      [dleverton@shiny-one pms] $ echo ${EAPI}
>      123#foo

Darn. So we need another [ \t] in the last subexpression:

-^[ \t]*EAPI=(['"]?)([A-Za-z0-9+_.-]*)\1[ \t]*(#.*)?$
+^[ \t]*EAPI=(['"]?)([A-Za-z0-9+_.-]*)\1[ \t]*([ \t]#.*)?$

>> +The package manager may optionally determine the EAPI of an ebuild by parsing its first non-blank
>> +and non-comment line, using above regular expression. If a recognised EAPI has been determined
>> +such, then the package manager must make sure that the \t{EAPI} value obtained by sourcing the
>> +ebuild with bash is identical to the EAPI obtained by parsing. The ebuild must be treated as
>> +invalid if these values are different.

> 3) If the first non-blank non-comment /doesn't/ match the magic regexp, 
> should the PM insist that the post-source EAPI is 0 (or unset), or 
> should it accept whatever it gets?

The former. If the first non-blank non-comment doesn't match the
regexp, then the EAPI determined by parsing is 0 (or empty, which is
equivalent).

Do we need to clarify the wording here? (Patches are welcome.)

Ulrich


Replies:
[PATCH 2/2] Require a space before the trailing comment
-- David Leverton
[PATCH 1/2] Clarify wording for EAPI parsing
-- David Leverton
References:
EAPI specification in ebuilds
-- Ulrich Mueller
Re: EAPI specification in ebuilds
-- David Leverton
Re: EAPI specification in ebuilds
-- Ulrich Mueller
Re: EAPI specification in ebuilds
-- David Leverton
Re: EAPI specification in ebuilds
-- Ulrich Mueller
Re: EAPI specification in ebuilds
-- Ulrich Mueller
Re: EAPI specification in ebuilds
-- Ciaran McCreesh
Re: EAPI specification in ebuilds
-- Ulrich Mueller
Re: EAPI specification in ebuilds
-- Ciaran McCreesh
Re: EAPI specification in ebuilds
-- Ulrich Mueller
Re: EAPI specification in ebuilds
-- Ciaran McCreesh
Re: EAPI specification in ebuilds
-- David Leverton
Re: EAPI specification in ebuilds
-- Ulrich Mueller
Re: EAPI specification in ebuilds
-- Zac Medico
Re: EAPI specification in ebuilds
-- Ulrich Mueller
Re: EAPI specification in ebuilds
-- David Leverton
Navigation:
Lists: gentoo-pms: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: EAPI specification in ebuilds
Next by thread:
[PATCH 1/2] Clarify wording for EAPI parsing
Previous by date:
Re: EAPI specification in ebuilds
Next by date:
[PATCH 1/2] Clarify wording for EAPI parsing


Updated Jul 18, 2012

Summary: Archive of the gentoo-pms mailing list.

Donate to support our development efforts.

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