public inbox for gentoo-pms@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-pms] EAPI specification in ebuilds
@ 2012-04-06  7:40 Ulrich Mueller
  2012-04-06 17:29 ` Robin H. Johnson
                   ` (2 more replies)
  0 siblings, 3 replies; 38+ messages in thread
From: Ulrich Mueller @ 2012-04-06  7:40 UTC (permalink / raw
  To: gentoo-pms

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}
 



^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2012-05-17 10:15 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-06  7:40 [gentoo-pms] EAPI specification in ebuilds Ulrich Mueller
2012-04-06 17:29 ` Robin H. Johnson
2012-04-06 17:32   ` Brian Harring
2012-04-06 17:33   ` Ciaran McCreesh
2012-04-06 18:13   ` Ulrich Mueller
2012-04-06 18:08 ` Ciaran McCreesh
2012-04-06 18:57 ` David Leverton
2012-04-06 21:25   ` Ulrich Mueller
2012-04-06 21:56     ` David Leverton
2012-04-07  2:44       ` Ulrich Mueller
2012-04-10 10:53         ` Ulrich Mueller
2012-04-10 15:43           ` Zac Medico
2012-04-10 16:30             ` Brian Harring
2012-04-10 16:35               ` Zac Medico
2012-04-10 16:58               ` Ulrich Mueller
2012-04-10 19:23                 ` Zac Medico
2012-04-10 19:25           ` Ciaran McCreesh
2012-04-10 20:13             ` Ulrich Mueller
2012-04-10 20:16               ` Ciaran McCreesh
2012-04-10 21:19                 ` Ulrich Mueller
2012-04-10 21:41                   ` Ciaran McCreesh
2012-04-10 22:11                     ` Ulrich Mueller
2012-04-10 23:20                     ` David Leverton
2012-04-11  8:04                       ` Ulrich Mueller
2012-04-11 16:31                         ` Zac Medico
2012-04-11 18:02                           ` David Leverton
2012-04-11 18:22                             ` Zac Medico
2012-04-12 11:55                           ` Ulrich Mueller
2012-04-15 22:30                             ` Zac Medico
2012-04-15 23:12                               ` Ulrich Mueller
2012-05-13 18:23                             ` David Leverton
2012-05-13 19:00                               ` Ulrich Mueller
2012-05-13 19:11                                 ` [gentoo-pms] [PATCH 1/2] Clarify wording for EAPI parsing David Leverton
2012-05-13 19:35                                   ` Ulrich Mueller
2012-05-13 19:40                                     ` David Leverton
2012-05-13 20:46                                       ` Ulrich Mueller
2012-05-17 10:15                                         ` Ulrich Mueller
2012-05-13 19:12                                 ` [gentoo-pms] [PATCH 2/2] Require a space before the trailing comment David Leverton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox