Gentoo Archives: gentoo-pms

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-pms@l.g.o
Cc: "Ulrich Müller" <ulm@g.o>
Subject: [gentoo-pms] [PATCH 13/21] EAPI 8 accumulates PROPERTIES and RESTRICT across eclasses
Date: Thu, 27 May 2021 20:28:16
Message-Id: 20210527202609.6445-14-ulm@gentoo.org
In Reply to: [gentoo-pms] EAPI 8 draft for review by "Ulrich Müller"
1 Bug: https://bugs.gentoo.org/701132
2 Signed-off-by: Ulrich Müller <ulm@g.o>
3 ---
4 eapi-differences.tex | 4 ++++
5 eclasses.tex | 27 ++++++++++++++++++++++-----
6 2 files changed, 26 insertions(+), 5 deletions(-)
7
8 diff --git a/eapi-differences.tex b/eapi-differences.tex
9 index aeddb6e..c7af2b3 100644
10 --- a/eapi-differences.tex
11 +++ b/eapi-differences.tex
12 @@ -152,6 +152,9 @@ Parallel tests & \compactfeatureref{parallel-tests} &
13 \t{pkg_nofetch}, \t{src_unpack}, \t{src_prepare}, \t{src_configure},
14 \t{src_compile}, \t{src_test}, \t{src_install} \\
15
16 +Accumulate \t{RESTRICT} etc. & \compactfeatureref{accumulate-vars} &
17 + No & No & No & No & Yes \\
18 +
19 \t{AA} & \compactfeatureref{aa} &
20 * & No & No & No & No \\
21
22 @@ -499,6 +502,7 @@ EAPI 8 is EAPI 7 with the following changes:
23 \item \t{IDEPEND}, \featureref{idepend}.
24 \item Empty working directory in \t{pkg_*} phase functions, \featureref{phase-function-dir}.
25 \item Different \t{src_prepare} implementation, \featureref{src-prepare}.
26 +\item \t{PROPERTIES} and \t{RESTRICT} accumulated across eclasses, \featureref{accumulate-vars}.
27 \end{compactitem}
28
29 \ChangeWhenAddingAnEAPI{8}
30 diff --git a/eclasses.tex b/eclasses.tex
31 index 7f4ba67..a92ce1f 100644
32 --- a/eclasses.tex
33 +++ b/eclasses.tex
34 @@ -34,11 +34,28 @@ The \t{inherit} command must also ensure that:
35
36 \section{Eclass-defined Metadata Keys}
37
38 -The \t{IUSE}, \t{REQUIRED_USE}, \t{DEPEND}, \t{BDEPEND}, \t{RDEPEND}, \t{PDEPEND} and \t{IDEPEND}
39 -variables are handled specially when set by an eclass. They must be accumulated across eclasses,
40 -appending the value set by each eclass to the resulting value after the previous one is loaded.
41 -Then the eclass-defined value is appended to that defined by the ebuild. In the case of \t{RDEPEND},
42 -this is done after the implicit \t{RDEPEND} rules in section~\ref{sec:rdepend-depend} are applied.
43 +\featurelabel{accumulate-vars} The \t{IUSE}, \t{REQUIRED_USE}, \t{DEPEND}, \t{BDEPEND}, \t{RDEPEND},
44 +\t{PDEPEND} and \t{IDEPEND} variables are handled specially when set by an eclass. They must be
45 +accumulated across eclasses, appending the value set by each eclass to the resulting value after
46 +the previous one is loaded. For EAPIs listed in table~\ref{tab:accumulate-vars} as accumulating
47 +\t{PROPERTIES} and \t{RESTRICT}, the same is true for these variables. Then the eclass-defined
48 +value is appended to that defined by the ebuild. In the case of \t{RDEPEND}, this is done after
49 +the implicit \t{RDEPEND} rules in section~\ref{sec:rdepend-depend} are applied.
50 +
51 +\ChangeWhenAddingAnEAPI{8}
52 +\begin{centertable}{EAPIs accumulating \t{PROPERTIES} and \t{RESTRICT} across eclasses}
53 + \label{tab:accumulate-vars}
54 + \begin{tabular}{lll}
55 + \toprule
56 + \multicolumn{1}{c}{\textbf{EAPI}} &
57 + \multicolumn{1}{c}{\textbf{Accumulates \t{PROPERTIES}?}} &
58 + \multicolumn{1}{c}{\textbf{Accumulates \t{RESTRICT}?}} \\
59 + \midrule
60 + 0, 1, 2, 3, 4, 5, 6, 7 & No & No \\
61 + 8 & Yes & Yes \\
62 + \bottomrule
63 + \end{tabular}
64 +\end{centertable}
65
66 \section{EXPORT_FUNCTIONS}
67
68 --
69 2.31.1