Gentoo Archives: gentoo-portage-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-portage-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-portage-dev] [PATCH eapi6-pt2 v3 2/5] nonfatal: Implement fallback executable for EAPI 7
Date: Sun, 11 Mar 2018 09:17:46
Message-Id: 20180311091731.9062-2-mgorny@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH eapi6-pt2 v3 1/5] Allow package.*, use.* directories in EAPI 7 by "Michał Górny"
1 EAPI 7 specifies that nonfatal has to be implemented both as a bash
2 function and a fallback executable, so that it can be used e.g. via
3 find/xargs.
4
5 Bug: https://bugs.gentoo.org/622894
6 ---
7 bin/ebuild-helpers/nonfatal | 14 ++++++++++++++
8 1 file changed, 14 insertions(+)
9 create mode 100755 bin/ebuild-helpers/nonfatal
10
11 diff --git a/bin/ebuild-helpers/nonfatal b/bin/ebuild-helpers/nonfatal
12 new file mode 100755
13 index 000000000..5da07cc71
14 --- /dev/null
15 +++ b/bin/ebuild-helpers/nonfatal
16 @@ -0,0 +1,14 @@
17 +#!/bin/bash
18 +# Copyright 1999-2018 Gentoo Foundation
19 +# Distributed under the terms of the GNU General Public License v2
20 +
21 +source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
22 +
23 +if ! ___eapi_has_nonfatal; then
24 + die "${0##*/} not supported in this EAPI"
25 +fi
26 +if [[ $# -lt 1 ]]; then
27 + die "${0##*/}: Missing argument"
28 +fi
29 +
30 +PORTAGE_NONFATAL=1 exec "$@"
31 --
32 2.16.2