Gentoo Archives: gentoo-pms

From: David Leverton <levertond@××××××××××.com>
To: gentoo-pms@l.g.o
Cc: David Leverton <levertond@××××××××××.com>
Subject: [gentoo-pms] [PATCH] Not all phases have a default_ in EAPI 2
Date: Thu, 16 Oct 2008 12:58:46
Message-Id: 1224161914-27229-1-git-send-email-levertond@googlemail.com
1 ---
2 eapi-differences.tex | 8 +++++---
3 ebuild-functions.tex | 25 ++++++++++++++-----------
4 pkg-mgr-commands.tex | 5 +++--
5 3 files changed, 22 insertions(+), 16 deletions(-)
6
7 diff --git a/eapi-differences.tex b/eapi-differences.tex
8 index bf98e95..1a41f0a 100644
9 --- a/eapi-differences.tex
10 +++ b/eapi-differences.tex
11 @@ -143,8 +143,9 @@ Use dependencies & table~\ref{use-deps-table} & No & No &
12 \IFKDEBUILDCOLOUR{Installed} \\
13 }{}
14
15 -\t{default\_} phase functions & table~\ref{default-phase-function-table} & No & No &
16 - \IFANYKDEBUILDELSE{\IFKDEBUILDCOLOUR{No} &}{} Yes \\
17 +\t{default\_} phase functions & table~\ref{default-phase-function-table} & None & None &
18 + \IFANYKDEBUILDELSE{\IFKDEBUILDCOLOUR{None} &}{} \parbox[t]{1in}{\t{pkg\_nofetch}, \t{src\_unpack},
19 + \t{src\_prepare}, \t{src\_configure}, \t{src\_compile}, \t{src\_test}} \\
20
21 \IFANYKDEBUILDELSE{
22 \IFKDEBUILDCOLOUR{\t{dohard}} &
23 @@ -243,7 +244,8 @@ EAPI 2 is EAPI 1 with the following changes:
24 \item \t{src\_prepare}, table~\ref{src-prepare-table}.
25 \item \t{src\_configure}, table~\ref{src-configure-table}.
26 \item Different \t{src\_compile} implementation, table~\ref{src-compile-table}.
27 -\item \t{default\_} phase functions, table~\ref{default-phase-function-table}.
28 +\item \t{default\_} phase functions for phases \t{pkg\_nofetch}, \t{src\_unpack}, \t{src\_prepare},
29 + \t{src\_configure}, \t{src\_compile} and \t{src\_test}; table~\ref{default-phase-function-table}.
30 \item \t{doman} languages support, table~\ref{doman-table}.
31 \item \t{default} function, table~\ref{default-function-table}.
32 \end{compactitem}
33 diff --git a/ebuild-functions.tex b/ebuild-functions.tex
34 index bc654ad..98e3fd4 100644
35 --- a/ebuild-functions.tex
36 +++ b/ebuild-functions.tex
37 @@ -349,10 +349,11 @@ source files from their respective locations, with notes concerning licensing if
38 \t{pkg\_nofetch} must require no write access to any part of the filesystem.
39
40 \subsection{\t{default\_} Phase Functions}
41 +\label{default-phase-functions}
42
43 In EAPIs listed in table~\ref{default-phase-function-table} as supporting \t{default\_} phase
44 -functions, a function named \t{default\_\$\{EBUILD\_PHASE\}} that behaves as the default
45 -implementation for that EAPI shall be defined when executing any given \t{EBUILD\_PHASE}. Ebuilds
46 +functions, a function named \t{default\_}(phase) that behaves as the default
47 +implementation for that EAPI shall be defined when executing any ebuild phase listed in the table. Ebuilds
48 must not call these functions except when in the phase in question.
49
50 \begin{centertable}{EAPIs supporting \t{default\_} phase functions} \label{default-phase-function-table}
51 @@ -361,23 +362,25 @@ must not call these functions except when in the phase in question.
52 \begin{tabular}{ l l }
53 \toprule
54 \multicolumn{1}{c}{\textbf{EAPI}} &
55 - \multicolumn{1}{c}{\textbf{Supports \t{default\_} phase functions?}} \\
56 + \multicolumn{1}{c}{\textbf{Supports \t{default\_} functions in phases}} \\
57 \midrule
58 - \t{0} & No \\
59 - \t{1} & No \\
60 - \t{kdebuild-1} & No \\
61 - \t{2} & Yes \\
62 + \t{0} & None \\
63 + \t{1} & None \\
64 + \t{kdebuild-1} & None \\
65 + \t{2} & \parbox[t]{3in}{\t{pkg\_nofetch}, \t{src\_unpack}, \t{src\_prepare}, \t{src\_configure},
66 + \t{src\_compile}, \t{src\_test}} \\
67 \bottomrule
68 \end{tabular}
69 }{
70 \begin{tabular}{ l l }
71 \toprule
72 \multicolumn{1}{c}{\textbf{EAPI}} &
73 - \multicolumn{1}{c}{\textbf{Supports \t{default\_} phase functions?}} \\
74 + \multicolumn{1}{c}{\textbf{Supports \t{default\_} functions in phases}} \\
75 \midrule
76 - \t{0} & No \\
77 - \t{1} & No \\
78 - \t{2} & Yes \\
79 + \t{0} & None \\
80 + \t{1} & None \\
81 + \t{2} & \parbox[t]{3in}{\t{pkg\_nofetch}, \t{src\_unpack}, \t{src\_prepare}, \t{src\_configure},
82 + \t{src\_compile}, \t{src\_test}} \\
83 \bottomrule
84 \end{tabular}
85 }
86 diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex
87 index 875bddb..f960651 100644
88 --- a/pkg-mgr-commands.tex
89 +++ b/pkg-mgr-commands.tex
90 @@ -460,8 +460,9 @@ has returned.
91
92 \item[inherit] See section~\ref{inherit}.
93
94 -\item[default] Calls the \t{default\_\$\{EBUILD\_PHASE\}} function. Only available in EAPIs listed in
95 - table~\ref{default-function-table}.
96 +\item[default] Calls the \t{default\_} function for the current phase (see section~\ref{default-phase-functions}).
97 + Must not be called if the \t{default\_} function does not exist for the current phase in the current EAPI.
98 + Only available in EAPIs listed in table~\ref{default-function-table}.
99 \end{description}
100
101 \begin{centertable}{EAPIs supporting the \t{default} function} \label{default-function-table}
102 --
103 1.6.0.2

Replies

Subject Author
Re: [gentoo-pms] [PATCH] Not all phases have a default_ in EAPI 2 Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>