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 4682C1396D0 for ; Wed, 4 Oct 2017 20:48:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ABD62E0DC9; Wed, 4 Oct 2017 20:48:01 +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 8F2B6E0DC9 for ; Wed, 4 Oct 2017 20:48:01 +0000 (UTC) Received: from localhost.localdomain (d202-252.icpnet.pl [109.173.202.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 337A334178E; Wed, 4 Oct 2017 20:48:00 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-pms@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-pms] [PATCH 23/28] EAPI 7 provides command fallback for nonfatal. Date: Wed, 4 Oct 2017 22:47:07 +0200 Message-Id: <20171004204712.10391-24-mgorny@gentoo.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171004204712.10391-1-mgorny@gentoo.org> References: <20171004204712.10391-1-mgorny@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Package Manager Specification discussions X-BeenThere: gentoo-pms@gentoo.org X-BeenThere: gentoo-pms@lists.gentoo.org Reply-To: gentoo-pms@lists.gentoo.org X-Archives-Salt: 3068fd62-c9a0-4933-8020-07432c86ecb2 X-Archives-Hash: 37a1f343bd4769091c9a5bc1a386ecb0 Bug: https://bugs.gentoo.org/622894 --- eapi-differences.tex | 5 +++++ pkg-mgr-commands.tex | 17 ++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/eapi-differences.tex b/eapi-differences.tex index 70eadb5..fb469f6 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{nonfatal} function+command & \compactfeatureref{nonfatal-fallback} & + No & No & No & No & Yes \\ + \t{domo} install path & \compactfeatureref{domo-path} & \t{\$\{DESTTREE\}\slash share\slash locale} & \t{\$\{DESTTREE\}\slash share\slash locale} & @@ -454,6 +457,8 @@ EAPI 7 is EAPI 6 with the following changes: \item \t{ECLASSDIR} removed, \featureref{eclassdir}. \item \t{domo} installs to \t{/usr/share/locale}, ignoring \t{into}, \featureref{domo-path}. \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}. \end{compactitem} \ChangeWhenAddingAnEAPI{7} diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex index f3849fc..c17c9cc 100644 --- a/pkg-mgr-commands.tex +++ b/pkg-mgr-commands.tex @@ -22,6 +22,11 @@ The following commands affect this behaviour: 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}. + \featurelabel{nonfatal-fallback} In EAPIs listed in table~\ref{tab:commands-die-table} + as having \t{nonfatal} defined as both function and external command, the package manager must + provide both implementations to account both for calling in ebuild scope directly, and via + \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}. \end{description} @@ -29,14 +34,16 @@ The following commands affect this behaviour: \ChangeWhenAddingAnEAPI{7} \begin{centertable}{EAPI command failure behaviour} \label{tab:commands-die-table} - \begin{tabular}{lll} + \begin{tabular}{llll} \toprule \multicolumn{1}{c}{\textbf{EAPI}} & - \multicolumn{1}{c}{\textbf{Command failure behaviour}} & - \multicolumn{1}{c}{\textbf{Supports \t{nonfatal}?}} \\ + \multicolumn{1}{P{8em}}{\textbf{Command failure behaviour}} & + \multicolumn{1}{P{6em}}{\textbf{Supports \t{nonfatal}?}} & + \multicolumn{1}{P{12em}}{\textbf{\t{nonfatal} as both function and external command?}} \\ \midrule - 0, 1, 2, 3 & Non-zero exit & No \\ - 4, 5, 6, 7 & Aborts & Yes \\ + 0, 1, 2, 3 & Non-zero exit & No & n/a \\ + 4, 5, 6 & Aborts & Yes & No \\ + 7 & Aborts & Yes & Yes \\ \bottomrule \end{tabular} \end{centertable} -- 2.14.2