Gentoo Archives: gentoo-pms

From: "Michał Górny" <mgorny@g.o>
To: gentoo-pms@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-pms] [PATCH 13/28] EAPI 7 has BDEPEND
Date: Wed, 04 Oct 2017 20:47:46
Message-Id: 20171004204712.10391-14-mgorny@gentoo.org
In Reply to: [gentoo-pms] [PATCHES] EAPI 7, first draft for review by "Michał Górny"
1 Bug: https://bugs.gentoo.org/317337
2 ---
3 dependencies.tex | 36 ++++++++++++++++++++++++++++++++----
4 eapi-differences.tex | 4 ++++
5 ebuild-vars.tex | 1 +
6 eclasses.tex | 10 +++++-----
7 metadata-cache.tex | 2 ++
8 5 files changed, 44 insertions(+), 9 deletions(-)
9
10 diff --git a/dependencies.tex b/dependencies.tex
11 index 258b394..92e7bb9 100644
12 --- a/dependencies.tex
13 +++ b/dependencies.tex
14 @@ -15,7 +15,7 @@
15 None (ebuilds can rely only on the packages in the system~set) \\
16 \addlinespace
17 \t{src_unpack}, \t{src_prepare}, \t{src_configure}, \t{src_compile}, \t{src_test},
18 - \t{src_install} & \t{DEPEND} \\
19 + \t{src_install} & \t{DEPEND}, \t{BDEPEND} \\
20 \addlinespace
21 \t{pkg_preinst}, \t{pkg_postinst}, \t{pkg_prerm}, \t{pkg_postrm} &
22 \t{RDEPEND} (unless the particular dependency results in a circular dependency, in which
23 @@ -38,6 +38,18 @@ There are three classes of dependencies supported by ebuilds:
24 the package manager finishes the batch of installs.
25 \end{compactitem}
26
27 +\featurelabel{bdepend} Additionally, in EAPIs listed in table~\ref{tab:depend-table}
28 +as supporting \t{BDEPEND}, the build dependencies are split into two subclasses:
29 +
30 +\begin{compactitem}
31 +\item Build dependencies that are binary compatible with the native build system
32 + / CBUILD (\t{BDEPEND}). The ebuild is allowed to call binary executables
33 + installed by this kind of dependency.
34 +\item Build dependencies that are binary compatible with the system being built
35 + / CHOST (\t{DEPEND}). The ebuild must not execute binary executables installed
36 + by this kind of dependency.
37 +\end{compactitem}
38 +
39 Table~\ref{tab:phase-function-dependency-classes} lists dependencies which must be satisfied before
40 a particular phase function is executed.
41
42 @@ -50,7 +62,8 @@ The following elements are recognised in at least one class of specification. Al
43 be surrounded on both sides by whitespace, except at the start and end of the string.
44
45 \begin{compactitem}
46 -\item A package dependency specification. Permitted in \t{DEPEND}, \t{RDEPEND}, \t{PDEPEND}.
47 +\item A package dependency specification. Permitted in \t{DEPEND}, \t{BDEPEND}, \t{RDEPEND},
48 + \t{PDEPEND}.
49 \item A URI, in the form \t{proto://host/path}. Permitted in \t{SRC_URI} and \t{HOMEPAGE}\@.
50 In EAPIs listed in table~\ref{tab:uri-arrows-table} as supporting \t{SRC_URI} arrows, may
51 optionally be followed by whitespace, then \t{->}, then whitespace, then a simple filename when
52 @@ -68,7 +81,7 @@ be surrounded on both sides by whitespace, except at the start and end of the st
53 followed by an open parenthesis, followed by whitespace, followed by zero or more
54 of (a dependency item of any kind followed by whitespace), followed by a close parenthesis.
55 More formally: \t{any-of} \t{::=} \t{'||' whitespace '(' whitespace (item whitespace)* ')'}.
56 - Permitted in \t{DEPEND}, \t{RDEPEND}, \t{PDEPEND}, \t{LICENSE}, \t{REQUIRED_USE}.
57 + Permitted in \t{DEPEND}, \t{BDEPEND}, \t{RDEPEND}, \t{PDEPEND}, \t{LICENSE}, \t{REQUIRED_USE}.
58 \item An exactly-one-of group, which consists of the string \t{\textasciicircum\textasciicircum},
59 followed by whitespace, followed by an open parenthesis, followed by whitespace, followed by
60 zero or more of (a dependency item of any kind followed by whitespace), followed by a close
61 @@ -92,6 +105,20 @@ be surrounded on both sides by whitespace, except at the start and end of the st
62
63 In particular, note that whitespace is not optional.
64
65 +\ChangeWhenAddingAnEAPI{7}
66 +\begin{centertable}{EAPIs supporting additional dependency types}
67 + \label{tab:depend-table}
68 + \begin{tabular}{ll}
69 + \toprule
70 + \multicolumn{1}{c}{\textbf{EAPI}} &
71 + \multicolumn{1}{c}{\textbf{Supports \t{BDEPEND}?}} \\
72 + \midrule
73 + 0, 1, 2, 3, 4, 5, 6 & No \\
74 + 7 & Yes \\
75 + \bottomrule
76 + \end{tabular}
77 +\end{centertable}
78 +
79 \ChangeWhenAddingAnEAPI{7}
80 \begin{centertable}{EAPIs supporting \t{SRC_URI} arrows}
81 \label{tab:uri-arrows-table}
82 @@ -285,7 +312,8 @@ indicates that the package will not break if the matched package is uninstalled
83 a different matching package in a different slot.
84 \item[=] Indicates that any slot value is acceptable. In addition, for runtime dependencies,
85 indicates that the package will break unless a matching package with slot and sub-slot equal to the
86 -slot and sub-slot of the best installed version at the time the package was built is available.
87 +slot and sub-slot of the best version installed to \t{ESYSROOT} at the time the package was built
88 +is available.
89 \item[slot=] Indicates that only a specific slot value is acceptable, and otherwise behaves
90 identically to the plain equals slot operator.
91 \end{description}
92 diff --git a/eapi-differences.tex b/eapi-differences.tex
93 index 31cc5f6..9205125 100644
94 --- a/eapi-differences.tex
95 +++ b/eapi-differences.tex
96 @@ -41,6 +41,9 @@ of this document for a complete table of previous EAPIs.
97 \bottomrule
98 \endlastfoot
99
100 +\t{BDEPEND} & \compactfeatureref{bdepend} &
101 + No & No & No & No & Yes \\
102 +
103 \t{SYSROOT}, \t{ESYSROOT} & \compactfeatureref{sysroot} &
104 No & No & No & No & Yes \\
105
106 @@ -409,6 +412,7 @@ EAPI 7 is EAPI 6 with the following changes:
107 \item \t{patch} is compatible with GNU patch 2.7, \featureref{gnu-patch}.
108 \item \t{SYSROOT} and \t{ESYSROOT} added, \featureref{sysroot}.
109 \item \t{econf} adds \t{-{}-with-sysroot}, \featureref{econf-options}.
110 +\item \t{BDEPEND}, \featureref{bdepend}.
111 \end{compactitem}
112
113 \ChangeWhenAddingAnEAPI{7}
114 diff --git a/ebuild-vars.tex b/ebuild-vars.tex
115 index 32f853c..e4efcae 100644
116 --- a/ebuild-vars.tex
117 +++ b/ebuild-vars.tex
118 @@ -83,6 +83,7 @@ Ebuilds may define any of the following variables:
119 for its value if unset and when used with an eclass. See section~\ref{sec:rdepend-depend} for
120 details.
121 \item[PDEPEND] See section~\ref{sec:dependencies}.
122 +\item[BDEPEND] See section~\ref{sec:dependencies}.
123 \end{description}
124
125 \ChangeWhenAddingAnEAPI{7}
126 diff --git a/eclasses.tex b/eclasses.tex
127 index 49c6c4e..44683b5 100644
128 --- a/eclasses.tex
129 +++ b/eclasses.tex
130 @@ -34,11 +34,11 @@ The \t{inherit} command must also ensure that:
131
132 \section{Eclass-defined Metadata Keys}
133
134 -The \t{IUSE}, \t{REQUIRED_USE}, \t{DEPEND}, \t{RDEPEND} and \t{PDEPEND} variables are handled
135 -specially when set by an eclass. They must be accumulated across eclasses, appending the value set
136 -by each eclass to the resulting value after the previous one is loaded. Then the eclass-defined
137 -value is appended to that defined by the ebuild. In the case of \t{RDEPEND}, this is done after the
138 -implicit \t{RDEPEND} rules in section~\ref{sec:rdepend-depend} are applied.
139 +The \t{IUSE}, \t{REQUIRED_USE}, \t{DEPEND}, \t{BDEPEND}, \t{RDEPEND} and \t{PDEPEND} variables are
140 +handled specially when set by an eclass. They must be accumulated across eclasses, appending
141 +the value set by each eclass to the resulting value after the previous one is loaded. Then
142 +the eclass-defined value is appended to that defined by the ebuild. In the case of \t{RDEPEND}, this
143 +is done after the implicit \t{RDEPEND} rules in section~\ref{sec:rdepend-depend} are applied.
144
145 \section{EXPORT_FUNCTIONS}
146
147 diff --git a/metadata-cache.tex b/metadata-cache.tex
148 index 80018e4..df4b8ed 100644
149 --- a/metadata-cache.tex
150 +++ b/metadata-cache.tex
151 @@ -35,6 +35,8 @@ order. Other lines may be present following these; their meanings are not define
152 metadata; see table~\ref{tab:optional-vars-table}.
153 \item Defined phases (\t{DEFINED_PHASES}). In some EAPIs, may optionally be blank, regardless of
154 ebuild metadata; see table~\ref{tab:defined-phases-table}.
155 +\item Build-time dependencies for \t{CBUILD} host (\t{BDEPEND}).
156 + Blank in some EAPIs; see table~\ref{tab:depend-table}.
157 \item Blank lines to pad the file to 22 lines long
158 \end{compactenum}
159
160 --
161 2.14.2