From: Ulrich Mueller <ulm@gentoo.org>
To: gentoo-pms@lists.gentoo.org
Subject: Re: [gentoo-pms] EAPI specification in ebuilds
Date: Thu, 12 Apr 2012 13:55:59 +0200 [thread overview]
Message-ID: <20358.49871.13447.826431@a1i15.kph.uni-mainz.de> (raw)
In-Reply-To: <4F85B1C5.6040508@gentoo.org>
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}
next prev parent reply other threads:[~2012-04-12 11:56 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20358.49871.13447.826431@a1i15.kph.uni-mainz.de \
--to=ulm@gentoo.org \
--cc=gentoo-pms@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox