Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/pms:eapi-7 commit in: /
Date: Sat, 24 Feb 2018 12:59:01
Message-Id: 1519476924.a8045b4be82742641a2c424dd4606f1e35605b41.ulm@gentoo
1 commit: a8045b4be82742641a2c424dd4606f1e35605b41
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 29 14:33:22 2017 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 24 12:55:24 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=a8045b4b
7
8 EAPI 7 allows die in subshell.
9
10 Bug: https://bugs.gentoo.org/465008
11
12 eapi-differences.tex | 4 ++++
13 pkg-mgr-commands.tex | 25 ++++++++++++++++---------
14 2 files changed, 20 insertions(+), 9 deletions(-)
15
16 diff --git a/eapi-differences.tex b/eapi-differences.tex
17 index 97ca9ad..ddf480e 100644
18 --- a/eapi-differences.tex
19 +++ b/eapi-differences.tex
20 @@ -245,6 +245,9 @@ Output commands use stdout & \compactfeatureref{output-no-stdout} &
21 \t{die -n} & \compactfeatureref{nonfatal-die} &
22 No & No & No & Yes & Yes \\
23
24 +\t{die} in subshell & \compactfeatureref{subshell-die} &
25 + No & No & No & No & Yes \\
26 +
27 \t{eapply} & \compactfeatureref{eapply} &
28 No & No & No & Yes & Yes \\
29
30 @@ -469,6 +472,7 @@ EAPI 7 is EAPI 6 with the following changes:
31 \item Sandbox path removal commands, \featureref{sandbox-rm}.
32 \item Output commands no longer use stdout, \featureref{output-no-stdout}.
33 \item \t{eqawarn}, \featureref{eqawarn}.
34 +\item \t{die} is guaranteed to work in a subshell, \featureref{subshell-die}.
35 \end{compactitem}
36
37 \ChangeWhenAddingAnEAPI{7}
38
39 diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex
40 index 64d1bd1..0a0997a 100644
41 --- a/pkg-mgr-commands.tex
42 +++ b/pkg-mgr-commands.tex
43 @@ -27,7 +27,7 @@ The following commands affect this behaviour:
44 implementations to account for calling directly in ebuild scope or through \t{xargs}.
45
46 Explicit \t{die} or \t{assert} commands only respect \t{nonfatal} when called with the \t{-n}
47 - option and in EAPIs supporting this option, see table~\ref{tab:nonfatal-die}.
48 + option and in EAPIs supporting this option, see table~\ref{tab:die-properties}.
49 \end{description}
50
51 \ChangeWhenAddingAnEAPI{7}
52 @@ -209,23 +209,30 @@ completing. Ebuilds must not run any of these commands once the current phase fu
53 \item[die] \featurelabel{nonfatal-die} If called under the \t{nonfatal} command (as per
54 section~\ref{sec:failure-behaviour}) and with \t{-n} as its first parameter, displays a failure
55 message provided in its following argument and then returns a non-zero exit status. Only in
56 - EAPIs listed in table~\ref{tab:nonfatal-die} as supporting option~\t{-n}. Otherwise, displays
57 + EAPIs listed in table~\ref{tab:die-properties} as supporting option~\t{-n}. Otherwise, displays
58 a failure message provided in its first and only argument, and then aborts the build process.
59 - \t{die} is \e{not} guaranteed to work correctly if called from a subshell environment.
60 +
61 + \featurelabel{subshell-die} In EAPIs listed in table~\ref{tab:die-properties} as not providing
62 + subshell support, \t{die} is \e{not} guaranteed to work correctly if called from a subshell
63 + environment.
64 \item[assert] Checks the value of the shell's pipe status variable, and if any component is non-zero
65 (indicating failure), calls \t{die}, passing any parameters to it.
66 \end{description}
67
68 \ChangeWhenAddingAnEAPI{7}
69 -\begin{centertable}{EAPIs supporting \t{-n} for \t{die} and \t{assert} commands}
70 - \label{tab:nonfatal-die}
71 - \begin{tabular}{ll}
72 +\begin{centertable}{Properties of \t{die} and \t{assert} commands in EAPIs}
73 + \label{tab:die-properties}
74 + \begin{tabular}{lll}
75 \toprule
76 \multicolumn{1}{c}{\textbf{EAPI}} &
77 - \multicolumn{1}{c}{\textbf{\t{die} and \t{assert} support \t{-n}?}} \\
78 + \multicolumn{2}{c}{\textbf{\t{die} and \t{assert}}} \\
79 + &
80 + \multicolumn{1}{c}{\textbf{support \t{-n}?}} &
81 + \multicolumn{1}{c}{\textbf{work in subshell?}} \\
82 \midrule
83 - 0, 1, 2, 3, 4, 5 & No \\
84 - 6, 7 & Yes \\
85 + 0, 1, 2, 3, 4, 5 & No & No \\
86 + 6 & Yes & No \\
87 + 7 & Yes & Yes \\
88 \bottomrule
89 \end{tabular}
90 \end{centertable}