commit:     286f95a9661bff8086450fe06d4fee3a45053a8c
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 29 16:06:26 2024 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Nov 29 16:06:26 2024 +0000
URL:        https://gitweb.gentoo.org/proj/pms.git/commit/?id=286f95a9

EAPI 9 has pipestatus

Bug: https://bugs.gentoo.org/566342
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 eapi-differences.tex |  4 ++++
 pkg-mgr-commands.tex | 19 +++++++++++++++++++
 2 files changed, 23 insertions(+)

diff --git a/eapi-differences.tex b/eapi-differences.tex
index ddeb1e6..171f9e5 100644
--- a/eapi-differences.tex
+++ b/eapi-differences.tex
@@ -132,6 +132,9 @@ Output commands use stdout & 
\compactfeatureref{output-no-stdout} &
 \t{die} in subshell & \compactfeatureref{subshell-die} &
     No & Yes & Yes & Yes \\
 
+\t{pipestatus} & \compactfeatureref{pipestatus} &
+    No & No & No & Yes \\
+
 \t{econf -{}-datarootdir} & \compactfeatureref{econf-options} &
     No & No & Yes & Yes \\
 
@@ -363,6 +366,7 @@ EAPI 9 is EAPI 8 with the following changes:
 \begin{compactitem}
 \item Different default EAPI for profiles, \featureref{profile-eapi-default}.
 \item \t{assert} banned, \featureref{banned-commands}.
+\item \t{pipestatus} support, \featureref{pipestatus}.
 \item Absolute symlinks no longer being rewritten, \featureref{symlink-rewrite}
 
 \end{compactitem}

diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex
index 799d305..ca8ec23 100644
--- a/pkg-mgr-commands.tex
+++ b/pkg-mgr-commands.tex
@@ -205,6 +205,11 @@ completing. Ebuilds must not run any of these commands 
once the current phase fu
     failure), calls \t{die}, passing any parameters to it.
     In EAPIs listed in table~\ref{tab:banned-commands-table}, this command is 
banned as per
     section~\ref{sec:banned-commands}.
+\item[pipestatus] \featurelabel{pipestatus} Checks the shell's pipe status 
array, i.\,e.\ the exit
+    status of the command(s) in the most recently executed foreground 
pipeline. Returns shell true
+    (0) if all elements are zero, or the last non-zero element otherwise. If 
called with \t{-v}
+    as the first argument, also outputs the pipe status array as a 
space-separated list.
+    Only available in EAPIs listed in table~\ref{tab:pipestatus} as supporting 
\t{pipestatus}.
 \end{description}
 
 \ChangeWhenAddingAnEAPI{9}
@@ -223,6 +228,20 @@ completing. Ebuilds must not run any of these commands 
once the current phase fu
     \end{tabular}
 \end{centertable}
 
+\ChangeWhenAddingAnEAPI{9}
+\begin{centertable}{EAPIs supporting \t{pipestatus}}
+    \label{tab:pipestatus}
+    \begin{tabular}{ll}
+      \toprule
+      \multicolumn{1}{c}{\textbf{EAPI}} &
+      \multicolumn{1}{c}{\textbf{Supports \t{pipestatus}?}} \\
+      \midrule
+      0, 1, 2, 3, 4, 5, 6, 7, 8 & No  \\
+      9                         & Yes \\
+      \bottomrule
+    \end{tabular}
+\end{centertable}
+
 \subsection{Patch commands}
 These commands are used during the \t{src_prepare} phase to apply patches to 
the package's sources.
 Ebuilds must not run any of these commands once the current phase function has 
returned.

Reply via email to