Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/pms:eapi-7 commit in: /
Date: Fri, 29 Sep 2017 14:33:47
Message-Id: 1506695050.61e07aa2093c913d93039c6404a49e838224f473.mgorny@gentoo
1 commit: 61e07aa2093c913d93039c6404a49e838224f473
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 29 14:24:10 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 29 14:24:10 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=61e07aa2
7
8 EAPI 7 provides command fallback for nonfatal.
9
10 eapi-differences.tex | 5 +++++
11 pkg-mgr-commands.tex | 17 ++++++++++++-----
12 2 files changed, 17 insertions(+), 5 deletions(-)
13
14 diff --git a/eapi-differences.tex b/eapi-differences.tex
15 index 70eadb5..fb469f6 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{nonfatal} function+command & \compactfeatureref{nonfatal-fallback} &
23 + No & No & No & No & Yes \\
24 +
25 \t{domo} install path & \compactfeatureref{domo-path} &
26 \t{\$\{DESTTREE\}\slash share\slash locale} &
27 \t{\$\{DESTTREE\}\slash share\slash locale} &
28 @@ -454,6 +457,8 @@ EAPI 7 is EAPI 6 with the following changes:
29 \item \t{ECLASSDIR} removed, \featureref{eclassdir}.
30 \item \t{domo} installs to \t{/usr/share/locale}, ignoring \t{into}, \featureref{domo-path}.
31 \item \t{dolib} and \t{libopts} banned, \featureref{banned-commands}.
32 +\item \t{nonfatal} defined both as a shell function and external command,
33 + \featureref{nonfatal-fallback}.
34 \end{compactitem}
35
36 \ChangeWhenAddingAnEAPI{7}
37
38 diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex
39 index f3849fc..c17c9cc 100644
40 --- a/pkg-mgr-commands.tex
41 +++ b/pkg-mgr-commands.tex
42 @@ -22,6 +22,11 @@ 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 + \featurelabel{nonfatal-fallback} In EAPIs listed in table~\ref{tab:commands-die-table}
47 + as having \t{nonfatal} defined as both function and external command, the package manager must
48 + provide both implementations to account both for calling in ebuild scope directly, and via
49 + \t{xargs}.
50 +
51 Explicit \t{die} or \t{assert} commands only respect \t{nonfatal} when called with the \t{-n}
52 option and in EAPIs supporting this option, see table~\ref{tab:nonfatal-die}.
53 \end{description}
54 @@ -29,14 +34,16 @@ The following commands affect this behaviour:
55 \ChangeWhenAddingAnEAPI{7}
56 \begin{centertable}{EAPI command failure behaviour}
57 \label{tab:commands-die-table}
58 - \begin{tabular}{lll}
59 + \begin{tabular}{llll}
60 \toprule
61 \multicolumn{1}{c}{\textbf{EAPI}} &
62 - \multicolumn{1}{c}{\textbf{Command failure behaviour}} &
63 - \multicolumn{1}{c}{\textbf{Supports \t{nonfatal}?}} \\
64 + \multicolumn{1}{P{8em}}{\textbf{Command failure behaviour}} &
65 + \multicolumn{1}{P{6em}}{\textbf{Supports \t{nonfatal}?}} &
66 + \multicolumn{1}{P{12em}}{\textbf{\t{nonfatal} as both function and external command?}} \\
67 \midrule
68 - 0, 1, 2, 3 & Non-zero exit & No \\
69 - 4, 5, 6, 7 & Aborts & Yes \\
70 + 0, 1, 2, 3 & Non-zero exit & No & n/a \\
71 + 4, 5, 6 & Aborts & Yes & No \\
72 + 7 & Aborts & Yes & Yes \\
73 \bottomrule
74 \end{tabular}
75 \end{centertable}