1 |
commit: d6d6c4d480ae2e4961a480fcf6c7cd2fdd0c892a |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 28 14:10:20 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=d6d6c4d4 |
7 |
|
8 |
EAPI 7 disallows stdout output of output functions |
9 |
|
10 |
Bug: https://bugs.gentoo.org/483240 |
11 |
|
12 |
eapi-differences.tex | 4 ++++ |
13 |
pkg-mgr-commands.tex | 22 ++++++++++++++++++++-- |
14 |
2 files changed, 24 insertions(+), 2 deletions(-) |
15 |
|
16 |
diff --git a/eapi-differences.tex b/eapi-differences.tex |
17 |
index 96e0c0c..d7153a8 100644 |
18 |
--- a/eapi-differences.tex |
19 |
+++ b/eapi-differences.tex |
20 |
@@ -236,6 +236,9 @@ Sandbox \t{rm*} commands & \compactfeatureref{sandbox-rm} & |
21 |
Query command options & \compactfeatureref{pm-query-options} & |
22 |
None & None & \t{-{}-host-root} & \t{-{}-host-root} & \t{-b}, \t{-d}, \t{-r} \\ |
23 |
|
24 |
+Output commands use stdout & \compactfeatureref{output-no-stdout} & |
25 |
+ Yes & Yes & Yes & Yes & No \\ |
26 |
+ |
27 |
\t{die -n} & \compactfeatureref{nonfatal-die} & |
28 |
No & No & No & Yes & Yes \\ |
29 |
|
30 |
@@ -461,6 +464,7 @@ EAPI 7 is EAPI 6 with the following changes: |
31 |
\item \t{dohtml} banned, \featureref{banned-commands}. |
32 |
\item \t{dolib} and \t{libopts} banned, \featureref{banned-commands}. |
33 |
\item Sandbox path removal commands, \featureref{sandbox-rm}. |
34 |
+\item Output commands no longer use stdout, \featureref{output-no-stdout}. |
35 |
\end{compactitem} |
36 |
|
37 |
\ChangeWhenAddingAnEAPI{7} |
38 |
|
39 |
diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex |
40 |
index db871c3..d3b904c 100644 |
41 |
--- a/pkg-mgr-commands.tex |
42 |
+++ b/pkg-mgr-commands.tex |
43 |
@@ -161,8 +161,12 @@ These commands display messages to the user. Unless otherwise stated, the entire |
44 |
used as a message, with backslash-escaped characters interpreted as for the \t{echo -e} command of |
45 |
bash, notably \t{\textbackslash t} for a horizontal tab, \t{\textbackslash n} for a new line, and |
46 |
\t{\textbackslash\textbackslash} for a literal backslash. Ebuilds must not run any of these commands |
47 |
-once the current phase function has returned. Unless otherwise noted, output may be sent to stdout, |
48 |
-stderr or some other appropriate facility. |
49 |
+once the current phase function has returned. |
50 |
+ |
51 |
+\featurelabel{output-no-stdout} Unless otherwise noted, output may be sent to stderr or some other |
52 |
+appropriate facility. In EAPIs listed in table~\ref{tab:output-commands} as not allowing stdout |
53 |
+output, using stdout as an output facility is forbidden. |
54 |
+ |
55 |
\begin{description} |
56 |
\item[einfo] Displays an informational message. |
57 |
\item[einfon] Displays an informational message without a trailing newline. |
58 |
@@ -179,6 +183,20 @@ stderr or some other appropriate facility. |
59 |
message followed by a failure indicator. Returns its first argument as exit status. |
60 |
\end{description} |
61 |
|
62 |
+\ChangeWhenAddingAnEAPI{7} |
63 |
+\begin{centertable}{Output commands for EAPIs} |
64 |
+ \label{tab:output-commands} |
65 |
+ \begin{tabular}{ll} |
66 |
+ \toprule |
67 |
+ \multicolumn{1}{c}{\textbf{EAPI}} & |
68 |
+ \multicolumn{1}{c}{\textbf{Commands can output to stdout?}} \\ |
69 |
+ \midrule |
70 |
+ 0, 1, 2, 3, 4, 5, 6 & Yes \\ |
71 |
+ 7 & No \\ |
72 |
+ \bottomrule |
73 |
+ \end{tabular} |
74 |
+\end{centertable} |
75 |
+ |
76 |
\subsection{Error commands} |
77 |
These commands are used when an error is detected that will prevent the build process from |
78 |
completing. Ebuilds must not run any of these commands once the current phase function has returned. |