1 |
The D variable has been described as a "phase-specific variable" since |
2 |
the spec's early draft stage (SVN r19). However, Portage would always |
3 |
define the variable in all src_* phases, with the restriction that the |
4 |
directory would exist only in src_install(). |
5 |
|
6 |
In order to comply with the spec, ebuilds are working around this |
7 |
by temporarily installing files under WORKDIR, and moving them to D |
8 |
later. In addition, Perl eclasses use D in src_configure(), i.e. |
9 |
contrary to the spec and relying on Portage behaviour instead. |
10 |
|
11 |
Therefore, lift this unnecessary and somewhat artificial restriction. |
12 |
|
13 |
Signed-off-by: Ulrich Müller <ulm@g.o> |
14 |
--- |
15 |
ebuild-env-vars.tex | 15 +++++++++------ |
16 |
1 file changed, 9 insertions(+), 6 deletions(-) |
17 |
|
18 |
diff --git a/ebuild-env-vars.tex b/ebuild-env-vars.tex |
19 |
index a55c366..db693ab 100644 |
20 |
--- a/ebuild-env-vars.tex |
21 |
+++ b/ebuild-env-vars.tex |
22 |
@@ -179,24 +179,27 @@ variable. |
23 |
See also~\ref{sec:offset-vars}. Only for EAPIs listed in table~\ref{tab:offset-env-vars-table} |
24 |
as supporting \t{EPREFIX}. \\ |
25 |
\t{D} & |
26 |
- \t{src_install} & |
27 |
- No & |
28 |
+ \t{src_*} & |
29 |
+ Yes & |
30 |
Contains the full path to the image directory into which the package should be installed. |
31 |
+ Ebuilds must not attempt to access the directory in \t{src_*} phases other than \t{src_install}. |
32 |
The presence of a trailing slash is EAPI dependent as listed in table~\ref{tab:trailing-slash}. |
33 |
\\ |
34 |
\t{D} (continued) & |
35 |
\t{pkg_preinst}, \t{pkg_postinst} & |
36 |
- Yes & |
37 |
+ Yes\footnote{Consistent across \t{pkg_preinst} and \t{pkg_postinst}, but may not necessarily |
38 |
+ have the same value that it had in the \t{src_*} phases.} & |
39 |
Contains the full path to the image that is about to be or has just been merged. |
40 |
The presence of a trailing slash is EAPI dependent as listed in table~\ref{tab:trailing-slash}. |
41 |
\\ |
42 |
\t{ED} & |
43 |
- \t{src_install}, \t{pkg_preinst}, \t{pkg_postinst} & |
44 |
+ \t{src_*}, \t{pkg_preinst}, \t{pkg_postinst} & |
45 |
See \t{D} & |
46 |
Contains the concatenation of the paths in the \t{D} and \t{EPREFIX} variables, |
47 |
for convenience. See also the \t{EPREFIX} variable. Only for EAPIs listed in |
48 |
- table~\ref{tab:offset-env-vars-table} as supporting \t{ED}\@. The presence of a trailing slash |
49 |
- is EAPI dependent as listed in table~\ref{tab:trailing-slash}. \\ |
50 |
+ table~\ref{tab:offset-env-vars-table} as supporting \t{ED}\@. Ebuilds must not attempt to |
51 |
+ access the directory in \t{src_*} phases other than \t{src_install}. The presence of a trailing |
52 |
+ slash is EAPI dependent as listed in table~\ref{tab:trailing-slash}. \\ |
53 |
\t{DESTTREE} & |
54 |
\t{src_install} & |
55 |
No & |
56 |
-- |
57 |
2.39.0 |