From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1638246-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 23FD91581D3
	for <garchives@archives.gentoo.org>; Sun,  2 Jun 2024 09:57:39 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id F0EB6E2AF6;
	Sun,  2 Jun 2024 09:57:37 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id C8CE3E2AF6
	for <gentoo-commits@lists.gentoo.org>; Sun,  2 Jun 2024 09:57:37 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id E12A6343014
	for <gentoo-commits@lists.gentoo.org>; Sun,  2 Jun 2024 09:57:36 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 4E4B21C08
	for <gentoo-commits@lists.gentoo.org>; Sun,  2 Jun 2024 09:57:34 +0000 (UTC)
From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" <ulm@gentoo.org>
Message-ID: <1703852421.658ead31edffc3bf431c5840830a357e3fe555da.ulm@gentoo>
Subject: [gentoo-commits] proj/pms:eapi-9 commit in: /
X-VCS-Repository: proj/pms
X-VCS-Files: ebuild-env-vars.tex
X-VCS-Directories: /
X-VCS-Committer: ulm
X-VCS-Committer-Name: Ulrich Müller
X-VCS-Revision: 658ead31edffc3bf431c5840830a357e3fe555da
X-VCS-Branch: eapi-9
Date: Sun,  2 Jun 2024 09:57:34 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 05f5e339-8191-43a2-8339-2b7b1d27e628
X-Archives-Hash: b0ab53d7bedc60b0b9983a38b31e5b62
Message-ID: <20240602095734.7aI8yta_CDfyje6g_GxDiEnJvNX6wq8-WyhCuwt48K4@z>

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