Gentoo Archives: gentoo-pms

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