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 DF5891396D1 for ; Fri, 29 Sep 2017 14:33:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3F68CE0C11; Fri, 29 Sep 2017 14:33:47 +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 0FCF0E0C11 for ; Fri, 29 Sep 2017 14:33:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 95777341791 for ; Fri, 29 Sep 2017 14:33:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F012F9092 for ; Fri, 29 Sep 2017 14:33:43 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1506695602.1c4f4985480ca80b2ebae0b3bd0a9b034f2976d1.mgorny@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: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 1c4f4985480ca80b2ebae0b3bd0a9b034f2976d1 X-VCS-Branch: eapi-7 Date: Fri, 29 Sep 2017 14:33:43 +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: 0bf701ed-a004-4c72-98ac-0cf7917975d5 X-Archives-Hash: 190ba2b07c03ac85f1db2a326c96a7e6 commit: 1c4f4985480ca80b2ebae0b3bd0a9b034f2976d1 Author: Michał Górny gentoo org> AuthorDate: Fri Sep 29 14:33:22 2017 +0000 Commit: Michał Górny gentoo org> CommitDate: Fri Sep 29 14:33:22 2017 +0000 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=1c4f4985 EAPI 7 allows die in subshell. eapi-differences.tex | 4 ++++ pkg-mgr-commands.tex | 23 +++++++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/eapi-differences.tex b/eapi-differences.tex index fb469f6..a0d1f01 100644 --- a/eapi-differences.tex +++ b/eapi-differences.tex @@ -41,6 +41,9 @@ of this document for a complete table of previous EAPIs. \bottomrule \endlastfoot +\t{die} in subshell & \compactfeatureref{subshell-die} & + No & No & No & No & Yes \\ + \t{nonfatal} function+command & \compactfeatureref{nonfatal-fallback} & No & No & No & No & Yes \\ @@ -459,6 +462,7 @@ EAPI 7 is EAPI 6 with the following changes: \item \t{dolib} and \t{libopts} banned, \featureref{banned-commands}. \item \t{nonfatal} defined both as a shell function and external command, \featureref{nonfatal-fallback}. +\item \t{die} guaranteed to work in a subshell environment, \featureref{subshell-die}. \end{compactitem} \ChangeWhenAddingAnEAPI{7} diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex index c17c9cc..af4cd35 100644 --- a/pkg-mgr-commands.tex +++ b/pkg-mgr-commands.tex @@ -181,23 +181,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}{EAPI-specific properties of \t{die} and \t{assert} commands} + \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}