From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-773202-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 089C3138A1A for <garchives@archives.gentoo.org>; Mon, 16 Feb 2015 15:08:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3E768E0955; Mon, 16 Feb 2015 15:08:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6BB55E09AE for <gentoo-commits@lists.gentoo.org>; Mon, 16 Feb 2015 15:08:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5D6443406F0 for <gentoo-commits@lists.gentoo.org>; Mon, 16 Feb 2015 15:08:12 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EF74411E3B for <gentoo-commits@lists.gentoo.org>; Mon, 16 Feb 2015 15:08:10 +0000 (UTC) From: "Ulrich Müller" <ulm@gentoo.org> 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" <ulm@gentoo.org> Message-ID: <1424099481.5193b09030983cc1d43e00dde8697e8b137d5113.ulm@gentoo> Subject: [gentoo-commits] proj/pms:eapi-6 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: 5193b09030983cc1d43e00dde8697e8b137d5113 X-VCS-Branch: eapi-6 Date: Mon, 16 Feb 2015 15:08:10 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: fae2c905-1bd3-4f64-a4e1-02094d6cce58 X-Archives-Hash: aa6ce96036f74d5ea78468734a5bc717 commit: 5193b09030983cc1d43e00dde8697e8b137d5113 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Mon Feb 16 14:42:19 2015 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Mon Feb 16 15:11:21 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/pms.git;a=commit;h=5193b090 EAPI 6: die and assert called with -n respect nonfatal. See bug 451938. --- eapi-differences.tex | 4 ++++ pkg-mgr-commands.tex | 38 +++++++++++++++++++++++++++++++------- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/eapi-differences.tex b/eapi-differences.tex index fdb0843..83689df 100644 --- a/eapi-differences.tex +++ b/eapi-differences.tex @@ -166,6 +166,9 @@ Most utilities die & \compactfeatureref{die-on-failure} & Option \t{-{}-host-root} & \compactfeatureref{host-root-option} & No & No & No & Yes & Yes \\ +\t{die -n} & \compactfeatureref{nonfatal-die} & + No & No & No & No & Yes \\ + \t{econf} arguments & \compactfeatureref{econf-options} & & & disable dependency tracking & disable dependency tracking, disable silent rules & @@ -316,6 +319,7 @@ EAPI 6 is EAPI 5 with the following changes: \item Bash version is 4.2, \featureref{bash-version}. \item \t{failglob} is enabled in global scope, \featureref{failglob}. \item \t{einstall} banned, \featureref{banned-commands}. +\item \t{die} and \t{assert} called with \t{-n} respect \t{nonfatal}, \featureref{nonfatal-die}. \end{compactitem} \ChangeWhenAddingAnEAPI{6} diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex index 66f8718..bf7fa6a 100644 --- a/pkg-mgr-commands.tex +++ b/pkg-mgr-commands.tex @@ -18,9 +18,11 @@ The following commands affect this behaviour: \begin{description} \item[nonfatal] \featurelabel{nonfatal} Executes the remainder of its arguments as a command, preserving the exit status. If this results in a command being called that would normally abort - the build process due to a failure (but not due to an explicit \t{die} or \t{assert} call), - instead a non-zero exit status shall be returned. Only in EAPIs listed in - table~\ref{tab:commands-die-table} as supporting \t{nonfatal}. + the build process due to a failure, instead a non-zero exit status shall be returned. Only in + EAPIs listed in table~\ref{tab:commands-die-table} as supporting \t{nonfatal}. + + 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-table}. \end{description} \ChangeWhenAddingAnEAPI{6} @@ -124,13 +126,35 @@ stderr or some other appropriate facility. 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. \begin{description} -\item[die] 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. +\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-table} 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. \item[assert] Checks the value of the shell's pipe status variable, and if any component is non-zero - (indicating failure), calls \t{die} with its first argument as a failure message. + (indicating failure), calls \t{die}, passing any parameters to it. \end{description} +\ChangeWhenAddingAnEAPI{6} +\begin{centertable}{EAPIs supporting \t{-n} for \t{die} and \t{assert} commands} + \label{tab:nonfatal-die-table} + \begin{tabular}{ l l } + \toprule + \multicolumn{1}{c}{\textbf{EAPI}} & + \multicolumn{1}{c}{\textbf{\t{die} and \t{assert} support \t{-n}?}} \\ + \midrule + \t{0} & No \\ + \t{1} & No \\ + \t{2} & No \\ + \t{3} & No \\ + \t{4} & No \\ + \t{5} & No \\ + \t{6} & Yes \\ + \bottomrule + \end{tabular} +\end{centertable} + \subsubsection{Build commands} These commands are used during the \t{src\_compile} and \t{src\_install} phases to run the package's build commands. Ebuilds must not run any of these commands once the current phase function