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: EAPI specification in ebuilds
Date: Fri, 6 Apr 2012 09:40:16 +0200
Hi,

The council has decided in its April meeting [1] that we should take
the route of parsing the EAPI assignment in ebuilds. Please find below
a draft wording for PMS. Thanks to dleverton, ferringb, and zmedico
for their input.

The plan would be to allow optional parsing now, and make it mandatory
in future, when EAPI 5 is introduced (i.e. EAPI 5 aware package
managers would have to implement it).

Ulrich

[1] <http://www.gentoo.org/proj/en/council/meeting-logs/20120403.txt>
    <http://www.gentoo.org/proj/en/council/meeting-logs/20120403-summary.txt>


--- 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,23 @@ 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.
 
+To enable parsing of ebuilds for the \t{EAPI} value, the \t{EAPI} assignment statement must adhere
+to the following syntax: It must consist of the string \t{EAPI}, followed by an equals sign,
+followed by the \t{EAPI} value, optionally enclosed in single or double quotes. The statement must
+be on its own line, optionally preceded or followed by whitespace (spaces or tabs), optionally
+followed by a comment. Thus, the line must match the following regular expression:
+\begin{verbatim}
+^[ \t]*EAPI=(['"]?)([A-Za-z0-9+_.-]*)\1[ \t]*(#.*)?$
+\end{verbatim}
+If an ebuild contains an \t{EAPI} assignment, the statement must occur within the first 20 lines.
+It is an error for an ebuild to contain more than one \t{EAPI} assignment.
+
+The package manager may optionally determine the \t{EAPI} of an ebuild by parsing it, using above
+regular expression and line number limit. If a recognised \t{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 one 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
-- Ciaran McCreesh
Re: EAPI specification in ebuilds
-- Robin H. Johnson
Navigation:
Lists: gentoo-pms: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
[PATCH] Remove unused LaTeX packages from pms.cls.
Next by thread:
Re: EAPI specification in ebuilds
Previous by date:
[PATCH] Remove unused LaTeX packages from pms.cls.
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.