commit: 658ead31edffc3bf431c5840830a357e3fe555da Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Fri Dec 29 11:54:18 2023 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Fri Dec 29 12:20:21 2023 +0000 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=658ead31
ebuild-env-vars.tex: Clarify that D is not valid in pkg_postinst D in pkg_* phases was first mentioned in SVN r74 (commit f627e46102c6) as a variable specific to the pkg_preinst phase function (replacing IMAGE). pkg_postinst was added in r88 (commit 3da3ee561f1a), but this was reverted in r89 (commit 65c466317718) "D in pkg_postinst == bad". pkg_postinst reappeared when the env vars section was converted to a table in commit 58d3bc0e8301. According to chapter 13 "Merging and Unmerging", the method used to perform the merge is not specified, and merging a regular file or a directory may alter or remove its source under D. Therefore, trying to access any file in D during the postinst phase is an error. The scope of ED follows that of D. Closes: https://bugs.gentoo.org/920889 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> ebuild-env-vars.tex | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ebuild-env-vars.tex b/ebuild-env-vars.tex index 5fe72dc..aae5413 100644 --- a/ebuild-env-vars.tex +++ b/ebuild-env-vars.tex @@ -192,14 +192,13 @@ inconsistent variable. 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\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. + \t{pkg_preinst} & + No\footnote{May not necessarily have the same value that it had in the \t{src_*} phases.} & + Contains the full path to the image directory of the package about to be merged. The presence of a trailing slash is EAPI dependent as listed in table~\ref{tab:trailing-slash}. \\ \t{ED} & - \t{src_*}, \t{pkg_preinst}, \t{pkg_postinst} & + \t{src_*}, \t{pkg_preinst} & 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