commit: ede65b5d136640575479c9c9a3162ee4d2be953e Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Tue Jan 3 20:11:28 2023 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Mon Jan 9 18:13:45 2023 +0000 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=ede65b5d
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 <AT> gentoo.org> ebuild-env-vars.tex | 15 +++++++++------ 1 file 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 &