commit: 8fbdd07ea357df6ebf05e9b4190a05beeb0c7ebd Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Fri Sep 29 14:24:10 2017 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Sun Feb 18 13:35:54 2018 +0000 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=8fbdd07e
EAPI 7 provides command fallback for nonfatal. Bug: https://bugs.gentoo.org/622894 eapi-differences.tex | 3 ++- pkg-mgr-commands.tex | 16 +++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/eapi-differences.tex b/eapi-differences.tex index 47c6950..f47a8c6 100644 --- a/eapi-differences.tex +++ b/eapi-differences.tex @@ -210,7 +210,7 @@ Most utilities die & \compactfeatureref{die-on-failure} & No & Yes & Yes & Yes & Yes \\ \t{nonfatal} & \compactfeatureref{nonfatal} & - No & Yes & Yes & Yes & Yes \\ + No & Yes & Yes & Yes & Function / external \\ \t{dohard} & \compactfeatureref{banned-commands} & Yes & Banned & Banned & Banned & Banned \\ @@ -445,6 +445,7 @@ EAPI 7 is EAPI 6 with the following changes: \t{-{}-host-root}, \featureref{pm-query-options}. \item \t{ENV_UNSET}, \featureref{env-unset}. \item \t{patch} is compatible with GNU patch 2.7, \featureref{gnu-patch}. +\item \t{nonfatal} is both a shell function and an external command, \featureref{nonfatal}. \end{compactitem} \ChangeWhenAddingAnEAPI{7} diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex index 16b3aa4..2312f81 100644 --- a/pkg-mgr-commands.tex +++ b/pkg-mgr-commands.tex @@ -22,6 +22,10 @@ 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}. + In EAPIs listed in table~\ref{tab:commands-die-table} as having \t{nonfatal} defined both + as a shell function and as an external command, the package manager must provide both + implementations to account for calling directly in ebuild scope or through \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 +33,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{5em}}{\textbf{Supports \t{nonfatal}?}} & + \multicolumn{1}{P{12em}}{\textbf{\t{nonfatal} is both a function and an 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}