commit: 61e07aa2093c913d93039c6404a49e838224f473
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 29 14:24:10 2017 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Sep 29 14:24:10 2017 +0000
URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=61e07aa2
EAPI 7 provides command fallback for nonfatal.
eapi-differences.tex | 5 +++++
pkg-mgr-commands.tex | 17 ++++++++++++-----
2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/eapi-differences.tex b/eapi-differences.tex
index 70eadb5..fb469f6 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{nonfatal} function+command & \compactfeatureref{nonfatal-fallback} &
+ No & No & No & No & Yes \\
+
\t{domo} install path & \compactfeatureref{domo-path} &
\t{\$\{DESTTREE\}\slash share\slash locale} &
\t{\$\{DESTTREE\}\slash share\slash locale} &
@@ -454,6 +457,8 @@ EAPI 7 is EAPI 6 with the following changes:
\item \t{ECLASSDIR} removed, \featureref{eclassdir}.
\item \t{domo} installs to \t{/usr/share/locale}, ignoring \t{into},
\featureref{domo-path}.
\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}.
\end{compactitem}
\ChangeWhenAddingAnEAPI{7}
diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex
index f3849fc..c17c9cc 100644
--- a/pkg-mgr-commands.tex
+++ b/pkg-mgr-commands.tex
@@ -22,6 +22,11 @@ The following commands affect this behaviour:
the build process due to a failure, instead a non-zero exit status shall
be returned. Only in
EAPIs listed in table~\ref{tab:commands-die-table} as supporting
\t{nonfatal}.
+ \featurelabel{nonfatal-fallback} In EAPIs listed in
table~\ref{tab:commands-die-table}
+ as having \t{nonfatal} defined as both function and external command, the
package manager must
+ provide both implementations to account both for calling in ebuild scope
directly, and via
+ \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}.
\end{description}
@@ -29,14 +34,16 @@ The following commands affect this behaviour:
\ChangeWhenAddingAnEAPI{7}
\begin{centertable}{EAPI command failure behaviour}
\label{tab:commands-die-table}
- \begin{tabular}{lll}
+ \begin{tabular}{llll}
\toprule
\multicolumn{1}{c}{\textbf{EAPI}} &
- \multicolumn{1}{c}{\textbf{Command failure behaviour}} &
- \multicolumn{1}{c}{\textbf{Supports \t{nonfatal}?}} \\
+ \multicolumn{1}{P{8em}}{\textbf{Command failure behaviour}} &
+ \multicolumn{1}{P{6em}}{\textbf{Supports \t{nonfatal}?}} &
+ \multicolumn{1}{P{12em}}{\textbf{\t{nonfatal} as both function and
external command?}} \\
\midrule
- 0, 1, 2, 3 & Non-zero exit & No \\
- 4, 5, 6, 7 & Aborts & Yes \\
+ 0, 1, 2, 3 & Non-zero exit & No & n/a \\
+ 4, 5, 6 & Aborts & Yes & No \\
+ 7 & Aborts & Yes & Yes \\
\bottomrule
\end{tabular}
\end{centertable}