commit:     1c4f4985480ca80b2ebae0b3bd0a9b034f2976d1
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 29 14:33:22 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Sep 29 14:33:22 2017 +0000
URL:        https://gitweb.gentoo.org/proj/pms.git/commit/?id=1c4f4985

EAPI 7 allows die in subshell.

 eapi-differences.tex |  4 ++++
 pkg-mgr-commands.tex | 23 +++++++++++++++--------
 2 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/eapi-differences.tex b/eapi-differences.tex
index fb469f6..a0d1f01 100644
--- a/eapi-differences.tex
+++ b/eapi-differences.tex
@@ -41,6 +41,9 @@ of this document for a complete table of previous EAPIs.
 \bottomrule
 \endlastfoot
 
+\t{die} in subshell & \compactfeatureref{subshell-die} &
+    No & No & No & No & Yes \\
+
 \t{nonfatal} function+command & \compactfeatureref{nonfatal-fallback} &
     No & No & No & No & Yes \\
 
@@ -459,6 +462,7 @@ EAPI 7 is EAPI 6 with the following changes:
 \item \t{dolib} and \t{libopts} banned, \featureref{banned-commands}.
 \item \t{nonfatal} defined both as a shell function and external command,
   \featureref{nonfatal-fallback}.
+\item \t{die} guaranteed to work in a subshell environment, 
\featureref{subshell-die}.
 \end{compactitem}
 
 \ChangeWhenAddingAnEAPI{7}

diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex
index c17c9cc..af4cd35 100644
--- a/pkg-mgr-commands.tex
+++ b/pkg-mgr-commands.tex
@@ -181,23 +181,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}{EAPI-specific properties of \t{die} and \t{assert} 
commands}
+    \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