From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 302A41382C5 for ; Sat, 24 Feb 2018 12:59:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EFE8EE0874; Sat, 24 Feb 2018 12:58:52 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BB568E0870 for ; Sat, 24 Feb 2018 12:58:52 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B30CE335C4B for ; Sat, 24 Feb 2018 12:58:51 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BC06A24A for ; Sat, 24 Feb 2018 12:58:47 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1519476924.a8045b4be82742641a2c424dd4606f1e35605b41.ulm@gentoo> Subject: [gentoo-commits] proj/pms:eapi-7 commit in: / X-VCS-Repository: proj/pms X-VCS-Files: eapi-differences.tex pkg-mgr-commands.tex X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: a8045b4be82742641a2c424dd4606f1e35605b41 X-VCS-Branch: eapi-7 Date: Sat, 24 Feb 2018 12:58:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: bc82533e-b6c0-458e-9e4f-a9936e421382 X-Archives-Hash: 58afe87178ed695449c55c6dce9111ac commit: a8045b4be82742641a2c424dd4606f1e35605b41 Author: Michał Górny gentoo org> AuthorDate: Fri Sep 29 14:33:22 2017 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Sat Feb 24 12:55:24 2018 +0000 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=a8045b4b EAPI 7 allows die in subshell. Bug: https://bugs.gentoo.org/465008 eapi-differences.tex | 4 ++++ pkg-mgr-commands.tex | 25 ++++++++++++++++--------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/eapi-differences.tex b/eapi-differences.tex index 97ca9ad..ddf480e 100644 --- a/eapi-differences.tex +++ b/eapi-differences.tex @@ -245,6 +245,9 @@ Output commands use stdout & \compactfeatureref{output-no-stdout} & \t{die -n} & \compactfeatureref{nonfatal-die} & No & No & No & Yes & Yes \\ +\t{die} in subshell & \compactfeatureref{subshell-die} & + No & No & No & No & Yes \\ + \t{eapply} & \compactfeatureref{eapply} & No & No & No & Yes & Yes \\ @@ -469,6 +472,7 @@ EAPI 7 is EAPI 6 with the following changes: \item Sandbox path removal commands, \featureref{sandbox-rm}. \item Output commands no longer use stdout, \featureref{output-no-stdout}. \item \t{eqawarn}, \featureref{eqawarn}. +\item \t{die} is guaranteed to work in a subshell, \featureref{subshell-die}. \end{compactitem} \ChangeWhenAddingAnEAPI{7} diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex index 64d1bd1..0a0997a 100644 --- a/pkg-mgr-commands.tex +++ b/pkg-mgr-commands.tex @@ -27,7 +27,7 @@ The following commands affect this behaviour: 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}. + option and in EAPIs supporting this option, see table~\ref{tab:die-properties}. \end{description} \ChangeWhenAddingAnEAPI{7} @@ -209,23 +209,30 @@ completing. Ebuilds must not run any of these commands once the current phase fu \item[die] \featurelabel{nonfatal-die} If called under the \t{nonfatal} command (as per section~\ref{sec:failure-behaviour}) and with \t{-n} as its first parameter, displays a failure message provided in its following argument and then returns a non-zero exit status. Only in - EAPIs listed in table~\ref{tab:nonfatal-die} as supporting option~\t{-n}. Otherwise, displays + EAPIs listed in table~\ref{tab:die-properties} as supporting option~\t{-n}. Otherwise, displays a failure message provided in its first and only argument, and then aborts the build process. - \t{die} is \e{not} guaranteed to work correctly if called from a subshell environment. + + \featurelabel{subshell-die} In EAPIs listed in table~\ref{tab:die-properties} as not providing + subshell support, \t{die} is \e{not} guaranteed to work correctly if called from a subshell + environment. \item[assert] Checks the value of the shell's pipe status variable, and if any component is non-zero (indicating failure), calls \t{die}, passing any parameters to it. \end{description} \ChangeWhenAddingAnEAPI{7} -\begin{centertable}{EAPIs supporting \t{-n} for \t{die} and \t{assert} commands} - \label{tab:nonfatal-die} - \begin{tabular}{ll} +\begin{centertable}{Properties of \t{die} and \t{assert} commands in EAPIs} + \label{tab:die-properties} + \begin{tabular}{lll} \toprule \multicolumn{1}{c}{\textbf{EAPI}} & - \multicolumn{1}{c}{\textbf{\t{die} and \t{assert} support \t{-n}?}} \\ + \multicolumn{2}{c}{\textbf{\t{die} and \t{assert}}} \\ + & + \multicolumn{1}{c}{\textbf{support \t{-n}?}} & + \multicolumn{1}{c}{\textbf{work in subshell?}} \\ \midrule - 0, 1, 2, 3, 4, 5 & No \\ - 6, 7 & Yes \\ + 0, 1, 2, 3, 4, 5 & No & No \\ + 6 & Yes & No \\ + 7 & Yes & Yes \\ \bottomrule \end{tabular} \end{centertable}