Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/pms:eapi-8 commit in: /
Date: Tue, 18 May 2021 05:44:40
Message-Id: 1621316655.8c883c34c1c91843e814edca72555723c1f41bba.ulm@gentoo
1 commit: 8c883c34c1c91843e814edca72555723c1f41bba
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 22 20:32:41 2019 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Tue May 18 05:44:15 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=8c883c34
7
8 EAPI 8 has install-time dependencies (IDEPEND)
9
10 Bug: https://bugs.gentoo.org/660306
11 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
12 [Updated as discussed in -pms mailing list]
13 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
14
15 dependencies.tex | 25 +++++++++++++++++--------
16 eapi-differences.tex | 4 ++++
17 ebuild-env-vars.tex | 5 +++--
18 ebuild-vars.tex | 1 +
19 eclasses.tex | 10 +++++-----
20 metadata-cache.tex | 2 ++
21 6 files changed, 32 insertions(+), 15 deletions(-)
22
23 diff --git a/dependencies.tex b/dependencies.tex
24 index f25c238..a40804a 100644
25 --- a/dependencies.tex
26 +++ b/dependencies.tex
27 @@ -21,7 +21,7 @@
28 \t{src_install} & \t{DEPEND}, \t{BDEPEND} \\
29 \addlinespace
30 \t{pkg_preinst}, \t{pkg_postinst}, \t{pkg_prerm}, \t{pkg_postrm} &
31 - \t{RDEPEND} \\
32 + \t{RDEPEND}, \t{IDEPEND} \\
33 \addlinespace
34 \t{pkg_config} & \t{RDEPEND}, \t{PDEPEND} \\
35 \bottomrule
36 @@ -32,7 +32,7 @@
37 \label{tab:dep-class-api}
38 \begin{tabular}{llll}
39 \toprule
40 - & \t{BDEPEND} & \t{DEPEND} & \t{RDEPEND}, \t{PDEPEND} \\
41 + & \t{BDEPEND}, \t{IDEPEND} & \t{DEPEND} & \t{RDEPEND}, \t{PDEPEND} \\
42 \midrule
43 Binary compatible with & \t{CBUILD} & \t{CHOST} & \t{CHOST} \\
44 Base unprefixed path & \t{/} & \t{\$\{SYSROOT\}} & \t{\$\{ROOT\}} \\
45 @@ -82,16 +82,24 @@ as supporting \t{BDEPEND}, the build dependencies are split into two subclasses:
46 dependency.
47 \end{compactitem}
48
49 +\featurelabel{idepend} Additionally, in EAPIs listed in table~\ref{tab:depend-table} as supporting
50 +\t{IDEPEND}, install-time dependencies can be specified. These dependencies are binary compatible
51 +with the native build system (\t{CBUILD}). Ebuilds are allowed to call them in \t{pkg_preinst} and
52 +\t{pkg_postinst}. Ebuilds may also call them in \t{pkg_prerm} and \t{pkg_postrm} but must not rely
53 +on them being available.
54 +
55 \ChangeWhenAddingAnEAPI{8}
56 \begin{centertable}{EAPIs supporting additional dependency types}
57 \label{tab:depend-table}
58 - \begin{tabular}{ll}
59 + \begin{tabular}{lll}
60 \toprule
61 \multicolumn{1}{c}{\textbf{EAPI}} &
62 - \multicolumn{1}{c}{\textbf{Supports \t{BDEPEND}?}} \\
63 + \multicolumn{1}{c}{\textbf{Supports \t{BDEPEND}?}} &
64 + \multicolumn{1}{c}{\textbf{Supports \t{IDEPEND}?}} \\
65 \midrule
66 - 0, 1, 2, 3, 4, 5, 6 & No \\
67 - 7, 8 & Yes \\
68 + 0, 1, 2, 3, 4, 5, 6 & No & No \\
69 + 7 & Yes & No \\
70 + 8 & Yes & Yes \\
71 \bottomrule
72 \end{tabular}
73 \end{centertable}
74 @@ -111,7 +119,7 @@ be surrounded on both sides by whitespace, except at the start and end of the st
75
76 \begin{compactitem}
77 \item A package dependency specification. Permitted in \t{DEPEND}, \t{BDEPEND}, \t{RDEPEND},
78 - \t{PDEPEND}.
79 + \t{PDEPEND}, \t{IDEPEND}.
80 \item A URI, in the form \t{proto://host/path}. Permitted in \t{HOMEPAGE} and \t{SRC_URI}\@.
81 In EAPIs listed in table~\ref{tab:uri-arrows-table} as supporting \t{SRC_URI} arrows, may
82 optionally be followed by whitespace, then \t{->}, then whitespace, then a simple filename when
83 @@ -129,7 +137,8 @@ be surrounded on both sides by whitespace, except at the start and end of the st
84 followed by an open parenthesis, followed by whitespace, followed by one or more
85 of (a dependency item of any kind followed by whitespace), followed by a close parenthesis.
86 More formally: \t{any-of} \t{::=} \t{'||' whitespace '(' whitespace (item whitespace)+ ')'}.
87 - Permitted in \t{DEPEND}, \t{BDEPEND}, \t{RDEPEND}, \t{PDEPEND}, \t{LICENSE}, \t{REQUIRED_USE}.
88 + Permitted in \t{DEPEND}, \t{BDEPEND}, \t{RDEPEND}, \t{PDEPEND}, \t{IDEPEND}, \t{LICENSE},
89 + \t{REQUIRED_USE}.
90 \item An exactly-one-of group, which has the same format as the any-of group, but begins with the
91 string \t{\textasciicircum\textasciicircum} instead. Permitted in \t{REQUIRED_USE}.
92 \item \featurelabel{at-most-one-of} An at-most-one-of group, which has the same format as the
93
94 diff --git a/eapi-differences.tex b/eapi-differences.tex
95 index 22f99e2..f3af563 100644
96 --- a/eapi-differences.tex
97 +++ b/eapi-differences.tex
98 @@ -86,6 +86,9 @@ Selective URI restrictions & \compactfeatureref{uri-restrict} &
99 \t{BDEPEND} & \compactfeatureref{bdepend} &
100 No & No & No & Yes & Yes \\
101
102 +\t{IDEPEND} & \compactfeatureref{idepend} &
103 + No & No & No & No & Yes \\
104 +
105 \t{??\ ( )} groups & \compactfeatureref{at-most-one-of} &
106 No & Yes & Yes & Yes & Yes \\
107
108 @@ -490,6 +493,7 @@ EAPI 8 is EAPI 7 with the following changes:
109 \item Less strict naming rules for files in \t{updates} directory, \featureref{updates-filenames}.
110 \item Bash version is 5.0, \featureref{bash-version}.
111 \item Selective fetch/mirror restriction, \featureref{uri-restrict}.
112 +\item \t{IDEPEND}, \featureref{idepend}.
113 \end{compactitem}
114
115 \ChangeWhenAddingAnEAPI{8}
116
117 diff --git a/ebuild-env-vars.tex b/ebuild-env-vars.tex
118 index 5f17ff8..fce7c6f 100644
119 --- a/ebuild-env-vars.tex
120 +++ b/ebuild-env-vars.tex
121 @@ -148,8 +148,9 @@ variable.
122 Ditto &
123 No &
124 \featurelabel{broot} The absolute path to the root directory containing build dependencies
125 - satisfied by \t{BDEPEND}, typically executable build tools. This includes any applicable offset
126 - prefix. Only for EAPIs listed in table~\ref{tab:offset-env-vars-table} as supporting \t{BROOT}.
127 + satisfied by \t{BDEPEND} and \t{IDEPEND}, typically executable build tools. This includes any
128 + applicable offset prefix. Only for EAPIs listed in table~\ref{tab:offset-env-vars-table} as
129 + supporting \t{BROOT}.
130 \\
131 \t{T} &
132 All &
133
134 diff --git a/ebuild-vars.tex b/ebuild-vars.tex
135 index 59c5b64..4f74e2b 100644
136 --- a/ebuild-vars.tex
137 +++ b/ebuild-vars.tex
138 @@ -86,6 +86,7 @@ Ebuilds may define any of the following variables:
139 for its value if unset and when used with an eclass. See section~\ref{sec:rdepend-depend} for
140 details.
141 \item[PDEPEND] See chapter~\ref{ch:dependencies}.
142 +\item[IDEPEND] See chapter~\ref{ch:dependencies}.
143 \end{description}
144
145 \ChangeWhenAddingAnEAPI{8}
146
147 diff --git a/eclasses.tex b/eclasses.tex
148 index bf0007b..7f4ba67 100644
149 --- a/eclasses.tex
150 +++ b/eclasses.tex
151 @@ -34,11 +34,11 @@ The \t{inherit} command must also ensure that:
152
153 \section{Eclass-defined Metadata Keys}
154
155 -The \t{IUSE}, \t{REQUIRED_USE}, \t{DEPEND}, \t{BDEPEND}, \t{RDEPEND} and \t{PDEPEND} variables
156 -are handled specially when set by an eclass. They must be accumulated across eclasses, appending
157 -the value set by each eclass to the resulting value after the previous one is loaded. Then the
158 -eclass-defined value is appended to that defined by the ebuild. In the case of \t{RDEPEND}, this
159 -is done after the implicit \t{RDEPEND} rules in section~\ref{sec:rdepend-depend} are applied.
160 +The \t{IUSE}, \t{REQUIRED_USE}, \t{DEPEND}, \t{BDEPEND}, \t{RDEPEND}, \t{PDEPEND} and \t{IDEPEND}
161 +variables are handled specially when set by an eclass. They must be accumulated across eclasses,
162 +appending the value set by each eclass to the resulting value after the previous one is loaded.
163 +Then the eclass-defined value is appended to that defined by the ebuild. In the case of \t{RDEPEND},
164 +this is done after the implicit \t{RDEPEND} rules in section~\ref{sec:rdepend-depend} are applied.
165
166 \section{EXPORT_FUNCTIONS}
167
168
169 diff --git a/metadata-cache.tex b/metadata-cache.tex
170 index 33574c4..d69ecdd 100644
171 --- a/metadata-cache.tex
172 +++ b/metadata-cache.tex
173 @@ -36,6 +36,8 @@ order. Other lines may be present following these; their meanings are not define
174 metadata; see table~\ref{tab:optional-vars-table}.
175 \item Defined phases (\t{DEFINED_PHASES}). In some EAPIs, may optionally be blank, regardless of
176 ebuild metadata; see table~\ref{tab:defined-phases-table}.
177 +\item Install-time dependencies (\t{IDEPEND}).
178 + Blank in some EAPIs; see table~\ref{tab:depend-table}.
179 \item Blank lines to pad the file to 22 lines long
180 \end{compactenum}