1 |
commit: 1c4f4985480ca80b2ebae0b3bd0a9b034f2976d1 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 29 14:33:22 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 29 14:33:22 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=1c4f4985 |
7 |
|
8 |
EAPI 7 allows die in subshell. |
9 |
|
10 |
eapi-differences.tex | 4 ++++ |
11 |
pkg-mgr-commands.tex | 23 +++++++++++++++-------- |
12 |
2 files changed, 19 insertions(+), 8 deletions(-) |
13 |
|
14 |
diff --git a/eapi-differences.tex b/eapi-differences.tex |
15 |
index fb469f6..a0d1f01 100644 |
16 |
--- a/eapi-differences.tex |
17 |
+++ b/eapi-differences.tex |
18 |
@@ -41,6 +41,9 @@ of this document for a complete table of previous EAPIs. |
19 |
\bottomrule |
20 |
\endlastfoot |
21 |
|
22 |
+\t{die} in subshell & \compactfeatureref{subshell-die} & |
23 |
+ No & No & No & No & Yes \\ |
24 |
+ |
25 |
\t{nonfatal} function+command & \compactfeatureref{nonfatal-fallback} & |
26 |
No & No & No & No & Yes \\ |
27 |
|
28 |
@@ -459,6 +462,7 @@ EAPI 7 is EAPI 6 with the following changes: |
29 |
\item \t{dolib} and \t{libopts} banned, \featureref{banned-commands}. |
30 |
\item \t{nonfatal} defined both as a shell function and external command, |
31 |
\featureref{nonfatal-fallback}. |
32 |
+\item \t{die} guaranteed to work in a subshell environment, \featureref{subshell-die}. |
33 |
\end{compactitem} |
34 |
|
35 |
\ChangeWhenAddingAnEAPI{7} |
36 |
|
37 |
diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex |
38 |
index c17c9cc..af4cd35 100644 |
39 |
--- a/pkg-mgr-commands.tex |
40 |
+++ b/pkg-mgr-commands.tex |
41 |
@@ -181,23 +181,30 @@ completing. Ebuilds must not run any of these commands once the current phase fu |
42 |
\item[die] \featurelabel{nonfatal-die} If called under the \t{nonfatal} command (as per |
43 |
section~\ref{sec:failure-behaviour}) and with \t{-n} as its first parameter, displays a failure |
44 |
message provided in its following argument and then returns a non-zero exit status. Only in |
45 |
- EAPIs listed in table~\ref{tab:nonfatal-die} as supporting option~\t{-n}. Otherwise, displays |
46 |
+ EAPIs listed in table~\ref{tab:die-properties} as supporting option~\t{-n}. Otherwise, displays |
47 |
a failure message provided in its first and only argument, and then aborts the build process. |
48 |
- \t{die} is \e{not} guaranteed to work correctly if called from a subshell environment. |
49 |
+ |
50 |
+ \featurelabel{subshell-die} In EAPIs listed in table~\ref{tab:die-properties} as not providing |
51 |
+ subshell support, \t{die} is \e{not} guaranteed to work correctly if called from a subshell |
52 |
+ environment. |
53 |
\item[assert] Checks the value of the shell's pipe status variable, and if any component is non-zero |
54 |
(indicating failure), calls \t{die}, passing any parameters to it. |
55 |
\end{description} |
56 |
|
57 |
\ChangeWhenAddingAnEAPI{7} |
58 |
-\begin{centertable}{EAPIs supporting \t{-n} for \t{die} and \t{assert} commands} |
59 |
- \label{tab:nonfatal-die} |
60 |
- \begin{tabular}{ll} |
61 |
+\begin{centertable}{EAPI-specific properties of \t{die} and \t{assert} commands} |
62 |
+ \label{tab:die-properties} |
63 |
+ \begin{tabular}{lll} |
64 |
\toprule |
65 |
\multicolumn{1}{c}{\textbf{EAPI}} & |
66 |
- \multicolumn{1}{c}{\textbf{\t{die} and \t{assert} support \t{-n}?}} \\ |
67 |
+ \multicolumn{2}{c}{\textbf{\t{die} and \t{assert}}} \\ |
68 |
+ & |
69 |
+ \multicolumn{1}{c}{\textbf{support \t{-n}?}} & |
70 |
+ \multicolumn{1}{c}{\textbf{work in subshell?}} \\ |
71 |
\midrule |
72 |
- 0, 1, 2, 3, 4, 5 & No \\ |
73 |
- 6, 7 & Yes \\ |
74 |
+ 0, 1, 2, 3, 4, 5 & No & No \\ |
75 |
+ 6 & Yes & No \\ |
76 |
+ 7 & Yes & Yes \\ |
77 |
\bottomrule |
78 |
\end{tabular} |
79 |
\end{centertable} |