diff options
author | Ulrich Müller <ulm@gentoo.org> | 2023-01-03 21:11:28 +0100 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2023-01-09 19:13:45 +0100 |
commit | ede65b5d136640575479c9c9a3162ee4d2be953e (patch) | |
tree | c4893f1b7dac0b3f4d4a45b0103ca0bbd6d8c098 | |
parent | Makefile: Use guessable names for section references in HTML output (diff) | |
download | pms-ede65b5d136640575479c9c9a3162ee4d2be953e.tar.gz pms-ede65b5d136640575479c9c9a3162ee4d2be953e.tar.bz2 pms-ede65b5d136640575479c9c9a3162ee4d2be953e.zip |
ebuild-env-vars.tex: D is available as a variable in all src_* phases
The D variable has been described as a "phase-specific variable" since
the spec's early draft stage (SVN r19). However, Portage would always
define the variable in all src_* phases, with the restriction that the
directory would exist only in src_install().
In reality, not all ebuilds comply with the spec. For example, Perl
eclasses use D in src_configure(), i.e. they rely on Portage behaviour.
Therefore, lift this unnecessary and somewhat artificial restriction
and make the variable (but not the directory) available outside the
install phase.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r-- | ebuild-env-vars.tex | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/ebuild-env-vars.tex b/ebuild-env-vars.tex index a55c366..db693ab 100644 --- a/ebuild-env-vars.tex +++ b/ebuild-env-vars.tex @@ -179,24 +179,27 @@ variable. See also~\ref{sec:offset-vars}. Only for EAPIs listed in table~\ref{tab:offset-env-vars-table} as supporting \t{EPREFIX}. \\ \t{D} & - \t{src_install} & - No & + \t{src_*} & + Yes & Contains the full path to the image directory into which the package should be installed. + Ebuilds must not attempt to access the directory in \t{src_*} phases other than \t{src_install}. The presence of a trailing slash is EAPI dependent as listed in table~\ref{tab:trailing-slash}. \\ \t{D} (continued) & \t{pkg_preinst}, \t{pkg_postinst} & - Yes & + Yes\footnote{Consistent across \t{pkg_preinst} and \t{pkg_postinst}, but may not necessarily + have the same value that it had in the \t{src_*} phases.} & Contains the full path to the image that is about to be or has just been merged. The presence of a trailing slash is EAPI dependent as listed in table~\ref{tab:trailing-slash}. \\ \t{ED} & - \t{src_install}, \t{pkg_preinst}, \t{pkg_postinst} & + \t{src_*}, \t{pkg_preinst}, \t{pkg_postinst} & See \t{D} & Contains the concatenation of the paths in the \t{D} and \t{EPREFIX} variables, for convenience. See also the \t{EPREFIX} variable. Only for EAPIs listed in - table~\ref{tab:offset-env-vars-table} as supporting \t{ED}\@. The presence of a trailing slash - is EAPI dependent as listed in table~\ref{tab:trailing-slash}. \\ + table~\ref{tab:offset-env-vars-table} as supporting \t{ED}\@. Ebuilds must not attempt to + access the directory in \t{src_*} phases other than \t{src_install}. The presence of a trailing + slash is EAPI dependent as listed in table~\ref{tab:trailing-slash}. \\ \t{DESTTREE} & \t{src_install} & No & |