commit:     f162015a61954fc60e07453912b7a5136eb1ceac
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 29 14:33:22 2017 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Feb 18 13:35:54 2018 +0000
URL:        https://gitweb.gentoo.org/proj/pms.git/commit/?id=f162015a

EAPI 7 allows die in subshell.

Bug: https://bugs.gentoo.org/465008

 eapi-differences.tex |  4 ++++
 pkg-mgr-commands.tex | 25 ++++++++++++++++---------
 2 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/eapi-differences.tex b/eapi-differences.tex
index 97ca9ad..ddf480e 100644
--- a/eapi-differences.tex
+++ b/eapi-differences.tex
@@ -245,6 +245,9 @@ Output commands use stdout & 
\compactfeatureref{output-no-stdout} &
 \t{die -n} & \compactfeatureref{nonfatal-die} &
     No & No & No & Yes & Yes \\
 
+\t{die} in subshell & \compactfeatureref{subshell-die} &
+    No & No & No & No & Yes \\
+
 \t{eapply} & \compactfeatureref{eapply} &
     No & No & No & Yes & Yes \\
 
@@ -469,6 +472,7 @@ EAPI 7 is EAPI 6 with the following changes:
 \item Sandbox path removal commands, \featureref{sandbox-rm}.
 \item Output commands no longer use stdout, \featureref{output-no-stdout}.
 \item \t{eqawarn}, \featureref{eqawarn}.
+\item \t{die} is guaranteed to work in a subshell, \featureref{subshell-die}.
 \end{compactitem}
 
 \ChangeWhenAddingAnEAPI{7}

diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex
index 9820340..91c19b6 100644
--- a/pkg-mgr-commands.tex
+++ b/pkg-mgr-commands.tex
@@ -27,7 +27,7 @@ The following commands affect this behaviour:
     implementations to account for calling directly in ebuild scope or through 
\t{xargs}.
 
     Explicit \t{die} or \t{assert} commands only respect \t{nonfatal} when 
called with the \t{-n}
-    option and in EAPIs supporting this option, see 
table~\ref{tab:nonfatal-die}.
+    option and in EAPIs supporting this option, see 
table~\ref{tab:die-properties}.
 \end{description}
 
 \ChangeWhenAddingAnEAPI{7}
@@ -209,23 +209,30 @@ completing. Ebuilds must not run any of these commands 
once the current phase fu
 \item[die] \featurelabel{nonfatal-die} If called under the \t{nonfatal} 
command (as per
     section~\ref{sec:failure-behaviour}) and with \t{-n} as its first 
parameter, displays a failure
     message provided in its following argument and then returns a non-zero 
exit status. Only in
-    EAPIs listed in table~\ref{tab:nonfatal-die} as supporting option~\t{-n}. 
Otherwise, displays
+    EAPIs listed in table~\ref{tab:die-properties} as supporting 
option~\t{-n}. Otherwise, displays
     a failure message provided in its first and only argument, and then aborts 
the build process.
-    \t{die} is \e{not} guaranteed to work correctly if called from a subshell 
environment.
+
+    \featurelabel{subshell-die} In EAPIs listed in 
table~\ref{tab:die-properties} as not providing
+    subshell support, \t{die} is \e{not} guaranteed to work correctly if 
called from a subshell
+    environment.
 \item[assert] Checks the value of the shell's pipe status variable, and if any 
component is non-zero
     (indicating failure), calls \t{die}, passing any parameters to it.
 \end{description}
 
 \ChangeWhenAddingAnEAPI{7}
-\begin{centertable}{EAPIs supporting \t{-n} for \t{die} and \t{assert} 
commands}
-    \label{tab:nonfatal-die}
-    \begin{tabular}{ll}
+\begin{centertable}{Properties of \t{die} and \t{assert} commands in EAPIs}
+    \label{tab:die-properties}
+    \begin{tabular}{lll}
       \toprule
       \multicolumn{1}{c}{\textbf{EAPI}} &
-      \multicolumn{1}{c}{\textbf{\t{die} and \t{assert} support \t{-n}?}} \\
+      \multicolumn{2}{c}{\textbf{\t{die} and \t{assert}}} \\
+      &
+      \multicolumn{1}{c}{\textbf{support \t{-n}?}} &
+      \multicolumn{1}{c}{\textbf{work in subshell?}} \\
       \midrule
-      0, 1, 2, 3, 4, 5  & No  \\
-      6, 7              & Yes \\
+      0, 1, 2, 3, 4, 5  & No  & No  \\
+      6                 & Yes & No  \\
+      7                 & Yes & Yes \\
       \bottomrule
     \end{tabular}
 \end{centertable}

Reply via email to