diff options
author | Michał Górny <mgorny@gentoo.org> | 2017-09-28 16:10:20 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2018-03-31 17:30:43 +0200 |
commit | 55afad74bfa1592fd8cc1be38fc542777507129e (patch) | |
tree | 8e8eea6135cd4afe9dc787652bf7d7b791b6244c | |
parent | EAPI 7 bans dolib and libopts. (diff) | |
download | pms-55afad74bfa1592fd8cc1be38fc542777507129e.tar.gz pms-55afad74bfa1592fd8cc1be38fc542777507129e.tar.bz2 pms-55afad74bfa1592fd8cc1be38fc542777507129e.zip |
EAPI 7 disallows stdout output of output functions
Bug: https://bugs.gentoo.org/483240
-rw-r--r-- | eapi-differences.tex | 4 | ||||
-rw-r--r-- | pkg-mgr-commands.tex | 22 |
2 files changed, 24 insertions, 2 deletions
diff --git a/eapi-differences.tex b/eapi-differences.tex index e5a53f1..2049ebc 100644 --- a/eapi-differences.tex +++ b/eapi-differences.tex @@ -224,6 +224,9 @@ Most utilities die & \compactfeatureref{die-on-failure} & Query command options & \compactfeatureref{pm-query-options} & None & None & \t{-{}-host-root} & \t{-{}-host-root} & \t{-b}, \t{-d}, \t{-r} \\ +Output commands use stdout & \compactfeatureref{output-no-stdout} & + Yes & Yes & Yes & Yes & No \\ + \t{die -n} & \compactfeatureref{nonfatal-die} & No & No & No & Yes & Yes \\ @@ -445,6 +448,7 @@ EAPI 7 is EAPI 6 with the following changes: \item \t{nonfatal} is both a shell function and an external command, \featureref{nonfatal}. \item \t{dohtml} banned, \featureref{banned-commands}. \item \t{dolib} and \t{libopts} banned, \featureref{banned-commands}. +\item Output commands no longer use stdout, \featureref{output-no-stdout}. \end{compactitem} \ChangeWhenAddingAnEAPI{7} diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex index 36e8fef..849d244 100644 --- a/pkg-mgr-commands.tex +++ b/pkg-mgr-commands.tex @@ -132,8 +132,12 @@ These commands display messages to the user. Unless otherwise stated, the entire used as a message, with backslash-escaped characters interpreted as for the \t{echo -e} command of bash, notably \t{\textbackslash t} for a horizontal tab, \t{\textbackslash n} for a new line, and \t{\textbackslash\textbackslash} for a literal backslash. Ebuilds must not run any of these commands -once the current phase function has returned. Unless otherwise noted, output may be sent to stdout, -stderr or some other appropriate facility. +once the current phase function has returned. + +\featurelabel{output-no-stdout} Unless otherwise noted, output may be sent to stderr or some other +appropriate facility. In EAPIs listed in table~\ref{tab:output-commands} as not allowing stdout +output, using stdout as an output facility is forbidden. + \begin{description} \item[einfo] Displays an informational message. \item[einfon] Displays an informational message without a trailing newline. @@ -150,6 +154,20 @@ stderr or some other appropriate facility. message followed by a failure indicator. Returns its first argument as exit status. \end{description} +\ChangeWhenAddingAnEAPI{7} +\begin{centertable}{Output commands for EAPIs} + \label{tab:output-commands} + \begin{tabular}{ll} + \toprule + \multicolumn{1}{c}{\textbf{EAPI}} & + \multicolumn{1}{c}{\textbf{Commands can output to stdout?}} \\ + \midrule + 0, 1, 2, 3, 4, 5, 6 & Yes \\ + 7 & No \\ + \bottomrule + \end{tabular} +\end{centertable} + \subsection{Error commands} These commands are used when an error is detected that will prevent the build process from completing. Ebuilds must not run any of these commands once the current phase function has returned. |