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: Thu, 12 Apr 2012 13:55:59 +0200
There seems to be consensus that the EAPI assignment should be in the
first non-blank non-comment line, and that the 20 lines limit should
be dropped. Please find a new iteration of the patch below.

Changes to previous version:
- Incorporated Ciaran's wording about position of EAPI assignment.
- Dropped 20 lines limit.
- Changed description of package manager's action accordingly. (Is it
  OK to simply say "first non-blank non-comment line" here?)
- Distinguish typographically between EAPI as a concept (roman type)
  and the EAPI environment variable (typewriter type).

Ulrich


--- a/ebuild-vars.tex
+++ b/ebuild-vars.tex
@@ -75,7 +75,7 @@ Ebuilds may define any of the following variables:
 
 \begin{description}
 \item[DEPEND] See section~\ref{sec:dependencies}.
-\item[EAPI] The EAPI. See below for defaults.
+\item[EAPI] The EAPI. See below.
 \item[PDEPEND] See section~\ref{sec:dependencies}.
 \item[RDEPEND] See section~\ref{sec:dependencies}. For some EAPIs, \t{RDEPEND} has special behaviour
     for its value if unset and when used with an eclass. See section~\ref{sec:rdepend-depend} for
@@ -124,6 +124,20 @@ ensure that it is unset.
 If any of these variables are set to invalid values, the package manager's behaviour is undefined;
 ideally, an error in one ebuild should not prevent operations upon other ebuilds or packages.
 
+If the EAPI is to be specified in an ebuild, the \t{EAPI} variable must be assigned to precisely
+once. The assignment must not be preceded by any lines other than blank lines or those that start
+with optional whitespace (spaces or tabs) followed by a \t{\#} character, and the line containing
+the assignment statement must match the following regular expression:
+\begin{verbatim}
+^[ \t]*EAPI=(['"]?)([A-Za-z0-9+_.-]*)\1[ \t]*(#.*)?$
+\end{verbatim}
+
+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.
+
 \subsection{\t{RDEPEND} value}
 \label{sec:rdepend-depend}
 


Replies:
Re: EAPI specification in ebuilds
-- David Leverton
Re: EAPI specification in ebuilds
-- Zac Medico
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
Navigation:
Lists: gentoo-pms: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: EAPI specification in ebuilds
Next by thread:
Re: EAPI specification in ebuilds
Previous by date:
Re: EAPI specification in ebuilds
Next by date:
Re: EAPI specification in ebuilds


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.