Gentoo Archives: gentoo-pms

From: Ulrich Mueller <ulm@g.o>
To: gentoo-pms@l.g.o
Subject: Re: [gentoo-pms] [PATCH 1/2] Clarify wording for EAPI parsing
Date: Sun, 13 May 2012 20:47:00
Message-Id: 20400.7609.247161.887999@a1i15.kph.uni-mainz.de
In Reply to: Re: [gentoo-pms] [PATCH 1/2] Clarify wording for EAPI parsing by David Leverton
1 >>>>> On Sun, 13 May 2012, David Leverton wrote:
2
3 >> Hm, the condition "If a recognised EAPI has been determined such,
4 >> then ..." is important and shouldn't be removed.
5
6 > I took that out because the PM should treat the parsed EAPI as
7 > authoritative whether or not it's recognised...
8
9 >> If the result of parsing is an EAPI not known to the package manager,
10 >> then the ebuild must not be sourced (but be rejected immediately).
11
12 > ... which is basically what you're saying here, but maybe you want
13 > explicit wording saying that the sourcing should be skipped in such a case?
14
15 Updated patch is included below, as discussed on IRC.
16
17 Ulrich
18
19
20 From 9d8525e70b808f200cde7ea39f028ef1af883e38 Mon Sep 17 00:00:00 2001
21 From: David Leverton <levertond@××××××××××.com>
22 Date: Sun, 13 May 2012 20:11:39 +0100
23 Subject: [PATCH] Clarify wording for EAPI parsing.
24
25 Clarify wording. Require a space before the trailing comment.
26 ---
27 ebuild-vars.tex | 7 ++++---
28 1 files changed, 4 insertions(+), 3 deletions(-)
29
30 diff --git a/ebuild-vars.tex b/ebuild-vars.tex
31 index f3b72bf..d39c491 100644
32 --- a/ebuild-vars.tex
33 +++ b/ebuild-vars.tex
34 @@ -129,12 +129,13 @@ once. The assignment must not be preceded by any lines other than blank lines or
35 with optional whitespace (spaces or tabs) followed by a \t{\#} character, and the line containing
36 the assignment statement must match the following regular expression:
37 \begin{verbatim}
38 -^[ \t]*EAPI=(['"]?)([A-Za-z0-9+_.-]*)\1[ \t]*(#.*)?$
39 +^[ \t]*EAPI=(['"]?)([A-Za-z0-9+_.-]*)\1[ \t]*([ \t]#.*)?$
40 \end{verbatim}
41
42 The package manager may optionally determine the EAPI of an ebuild by parsing its first non-blank
43 -and non-comment line, using above regular expression. If a recognised EAPI has been determined
44 -such, then the package manager must make sure that the \t{EAPI} value obtained by sourcing the
45 +and non-comment line, using the above regular expression. If it matches, the EAPI is the substring
46 +matched by the capturing parentheses (\t{0} if empty), otherwise it is \t{0}. For a recognised
47 +EAPI, the package manager must make sure that the \t{EAPI} value obtained by sourcing the
48 ebuild with bash is identical to the EAPI obtained by parsing. The ebuild must be treated as
49 invalid if these values are different.
50
51 --
52 1.7.8.6

Replies

Subject Author
Re: [gentoo-pms] [PATCH 1/2] Clarify wording for EAPI parsing Ulrich Mueller <ulm@g.o>