1 |
commit: 3f34e25d1eaa27d3a7969910858939fb89b25500 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 29 14:24:10 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=3f34e25d |
7 |
|
8 |
EAPI 7 provides command fallback for nonfatal. |
9 |
|
10 |
Bug: https://bugs.gentoo.org/622894 |
11 |
|
12 |
eapi-differences.tex | 3 ++- |
13 |
pkg-mgr-commands.tex | 16 +++++++++++----- |
14 |
2 files changed, 13 insertions(+), 6 deletions(-) |
15 |
|
16 |
diff --git a/eapi-differences.tex b/eapi-differences.tex |
17 |
index 47c6950..f47a8c6 100644 |
18 |
--- a/eapi-differences.tex |
19 |
+++ b/eapi-differences.tex |
20 |
@@ -210,7 +210,7 @@ Most utilities die & \compactfeatureref{die-on-failure} & |
21 |
No & Yes & Yes & Yes & Yes \\ |
22 |
|
23 |
\t{nonfatal} & \compactfeatureref{nonfatal} & |
24 |
- No & Yes & Yes & Yes & Yes \\ |
25 |
+ No & Yes & Yes & Yes & Function / external \\ |
26 |
|
27 |
\t{dohard} & \compactfeatureref{banned-commands} & |
28 |
Yes & Banned & Banned & Banned & Banned \\ |
29 |
@@ -445,6 +445,7 @@ EAPI 7 is EAPI 6 with the following changes: |
30 |
\t{-{}-host-root}, \featureref{pm-query-options}. |
31 |
\item \t{ENV_UNSET}, \featureref{env-unset}. |
32 |
\item \t{patch} is compatible with GNU patch 2.7, \featureref{gnu-patch}. |
33 |
+\item \t{nonfatal} is both a shell function and an external command, \featureref{nonfatal}. |
34 |
\end{compactitem} |
35 |
|
36 |
\ChangeWhenAddingAnEAPI{7} |
37 |
|
38 |
diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex |
39 |
index e3c27f7..fdf80e0 100644 |
40 |
--- a/pkg-mgr-commands.tex |
41 |
+++ b/pkg-mgr-commands.tex |
42 |
@@ -22,6 +22,10 @@ The following commands affect this behaviour: |
43 |
the build process due to a failure, instead a non-zero exit status shall be returned. Only in |
44 |
EAPIs listed in table~\ref{tab:commands-die-table} as supporting \t{nonfatal}. |
45 |
|
46 |
+ In EAPIs listed in table~\ref{tab:commands-die-table} as having \t{nonfatal} defined both |
47 |
+ as a shell function and as an external command, the package manager must provide both |
48 |
+ implementations to account for calling directly in ebuild scope or through \t{xargs}. |
49 |
+ |
50 |
Explicit \t{die} or \t{assert} commands only respect \t{nonfatal} when called with the \t{-n} |
51 |
option and in EAPIs supporting this option, see table~\ref{tab:nonfatal-die}. |
52 |
\end{description} |
53 |
@@ -29,14 +33,16 @@ The following commands affect this behaviour: |
54 |
\ChangeWhenAddingAnEAPI{7} |
55 |
\begin{centertable}{EAPI command failure behaviour} |
56 |
\label{tab:commands-die-table} |
57 |
- \begin{tabular}{lll} |
58 |
+ \begin{tabular}{llll} |
59 |
\toprule |
60 |
\multicolumn{1}{c}{\textbf{EAPI}} & |
61 |
- \multicolumn{1}{c}{\textbf{Command failure behaviour}} & |
62 |
- \multicolumn{1}{c}{\textbf{Supports \t{nonfatal}?}} \\ |
63 |
+ \multicolumn{1}{P{8em}}{\textbf{Command failure behaviour}} & |
64 |
+ \multicolumn{1}{P{5em}}{\textbf{Supports \t{nonfatal}?}} & |
65 |
+ \multicolumn{1}{P{12em}}{\textbf{\t{nonfatal} is both a function and an external command?}} \\ |
66 |
\midrule |
67 |
- 0, 1, 2, 3 & Non-zero exit & No \\ |
68 |
- 4, 5, 6, 7 & Aborts & Yes \\ |
69 |
+ 0, 1, 2, 3 & Non-zero exit & No & n/a \\ |
70 |
+ 4, 5, 6 & Aborts & Yes & No \\ |
71 |
+ 7 & Aborts & Yes & Yes \\ |
72 |
\bottomrule |
73 |
\end{tabular} |
74 |
\end{centertable} |