From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1708893-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 (4096 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 6C8181581F0
	for <garchives@archives.gentoo.org>; Sun, 12 Jan 2025 20:14:36 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 244FCE0828;
	Sun, 12 Jan 2025 20:14:35 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(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 7B305E07EC
	for <gentoo-commits@lists.gentoo.org>; Sun, 12 Jan 2025 20:14:34 +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) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id B3B94340C76
	for <gentoo-commits@lists.gentoo.org>; Sun, 12 Jan 2025 20:14:33 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id D6C5A2083
	for <gentoo-commits@lists.gentoo.org>; Sun, 12 Jan 2025 20:14:31 +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: <1736712571.b41c2378f40f13385afc080fcd10031f2eac3c8f.ulm@gentoo>
Subject: [gentoo-commits] proj/pms:eapi-9 commit in: /
X-VCS-Repository: proj/pms
X-VCS-Files: eapi-differences.tex ebuild-env-vars.tex ebuild-vars.tex
X-VCS-Directories: /
X-VCS-Committer: ulm
X-VCS-Committer-Name: Ulrich Müller
X-VCS-Revision: b41c2378f40f13385afc080fcd10031f2eac3c8f
X-VCS-Branch: eapi-9
Date: Sun, 12 Jan 2025 20:14:31 +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: ab373e72-3938-4d0c-ac74-7d10269731e2
X-Archives-Hash: e7375ad3f0e4b3fe6d19aa5ad90251a6

commit:     b41c2378f40f13385afc080fcd10031f2eac3c8f
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  7 17:13:28 2025 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Jan 12 20:09:31 2025 +0000
URL:        https://gitweb.gentoo.org/proj/pms.git/commit/?id=b41c2378

EAPI 9: Defined variables are no longer exported

Bug: https://bugs.gentoo.org/721088
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 eapi-differences.tex |  4 ++++
 ebuild-env-vars.tex  | 36 +++++++++++++++++++++++++++++-------
 ebuild-vars.tex      |  4 ++++
 3 files changed, 37 insertions(+), 7 deletions(-)

diff --git a/eapi-differences.tex b/eapi-differences.tex
index 0564ab4..df04ff9 100644
--- a/eapi-differences.tex
+++ b/eapi-differences.tex
@@ -69,6 +69,9 @@ Accumulate \t{PROPERTIES} & \compactfeatureref{accumulate-vars} &
 Accumulate \t{RESTRICT} & \compactfeatureref{accumulate-vars} &
     No & No & Yes & Yes \\
 
+Export variables & \compactfeatureref{export-vars} &
+    Yes & Yes & Yes & No \\
+
 \t{PORTDIR} & \compactfeatureref{portdir} &
     Yes & No & No & No \\
 
@@ -357,6 +360,7 @@ EAPI 9 is EAPI 8 with the following changes:
 \begin{compactitem}
 \item Bash version is 5.2, \featureref{bash-version}.
 \item Different default EAPI for profiles, \featureref{profile-eapi-default}.
+\item Defined variables no longer exported, \featureref{export-vars}.
 \end{compactitem}
 
 \ChangeWhenAddingAnEAPI{9}

diff --git a/ebuild-env-vars.tex b/ebuild-env-vars.tex
index 871a0d2..14ef7bc 100644
--- a/ebuild-env-vars.tex
+++ b/ebuild-env-vars.tex
@@ -1,10 +1,10 @@
 \section{Defined variables}
 \label{sec:ebuild-env-vars}
 
-The package manager must define the following environment variables. Not all variables are
-universally meaningful; variables that are not meaningful in a given phase or in global scope may
-be unset or set to any value. Ebuilds must not attempt to modify any of these variables, unless
-otherwise specified.
+The package manager must define the following variables. Not all variables are universally
+meaningful; variables that are not meaningful in a given phase or in global scope may be unset
+or set to any value. Ebuilds must not attempt to modify any of these variables, unless otherwise
+specified.
 
 Because of their special meanings, these variables may not be preserved consistently across all
 phases as would normally happen due to environment saving (see section~\ref{sec:ebuild-env-state}).
@@ -12,6 +12,26 @@ For example, \t{EBUILD_PHASE} is different for every phase, and \t{ROOT} may hav
 the various different \t{pkg_*} phases. Ebuilds must recalculate any variable they derive from an
 inconsistent variable.
 
+\featurelabel{export-vars} These variables are either exported to the environment or kept as
+unexported shell variables, as specified for EAPIs in table~\ref{tab:export-vars}; exceptions are
+\t{TMPDIR} and \t{HOME} which are always exported to the environment. In EAPIs where variables are
+not exported, the package manager must pass those that are required by ebuild-specific external
+commands (see section~\ref{sec:pkg-mgr-commands}) in an implementation-defined manner.
+
+\ChangeWhenAddingAnEAPI{9}
+\begin{centertable}{EAPIs with variables exported to the environment}
+    \label{tab:export-vars}
+    \begin{tabular}{ll}
+      \toprule
+      \multicolumn{1}{c}{\textbf{EAPI}} &
+      \multicolumn{1}{c}{\textbf{Variables exported?}} \\
+      \midrule
+      0, 1, 2, 3, 4, 5, 6, 7, 8 & Yes \\
+      9                         & No  \\
+      \bottomrule
+    \end{tabular}
+\end{centertable}
+
 \begin{landscape}
 % Reduce width of text area to make room for margin notes
 \addtolength{\hsize}{-25mm}
@@ -168,13 +188,15 @@ inconsistent variable.
 \t{TMPDIR} &
     All &
     Partially\footnotemark[\value{footnote}] &
-    Must be set to the location of a usable temporary directory, for any applications
-    called by an ebuild. Must not be used by ebuilds directly; see \t{T} above. \\
+    Must be set to the location of a usable temporary directory, for any applications called
+    by an ebuild. Must not be used by ebuilds directly; see \t{T} above. \t{TMPDIR} is always
+    exported to the environment. \\
 \t{HOME} &
     All &
     Partially\footnotemark[\value{footnote}] &
     The full path to an appropriate temporary directory for use by any programs invoked by the
-    ebuild that may read or modify the home directory. \\
+    ebuild that may read or modify the home directory. \t{HOME} is always exported to the
+    environment. \\
 \t{EPREFIX} &
     All &
     Yes &

diff --git a/ebuild-vars.tex b/ebuild-vars.tex
index b030943..9979ce9 100644
--- a/ebuild-vars.tex
+++ b/ebuild-vars.tex
@@ -335,6 +335,10 @@ defined based upon any variant condition.}
     \end{tabular}
 \end{centertable}
 
+For EAPIs listed in table~\ref{tab:export-vars} with the property that variables are not exported,
+the package manager must not export any of the variables specified in this section to the
+environment.
+
 % vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en :
 
 %%% Local Variables: