Gentoo Archives: gentoo-portage-dev

From: Brian Dolbec <dolsen@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] isolated-functions.sh: Output error message for nofatal die.
Date: Wed, 27 Jan 2016 22:20:18
Message-Id: 20160127141921.1dbe0013.dolsen@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH] isolated-functions.sh: Output error message for nofatal die. by "Ulrich Müller"
1 On Wed, 27 Jan 2016 22:05:51 +0100
2 Ulrich Müller <ulm@g.o> wrote:
3
4 > X-Gentoo-Bug: 573056
5 > ---
6 > bin/isolated-functions.sh | 11 ++++++-----
7 > 1 file changed, 6 insertions(+), 5 deletions(-)
8 >
9 > diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
10 > index 5766921..e320f71 100644
11 > --- a/bin/isolated-functions.sh
12 > +++ b/bin/isolated-functions.sh
13 > @@ -1,5 +1,5 @@
14 > #!/bin/bash
15 > -# Copyright 1999-2014 Gentoo Foundation
16 > +# Copyright 1999-2016 Gentoo Foundation
17 > # Distributed under the terms of the GNU General Public License v2
18 >
19 > source "${PORTAGE_BIN_PATH}/eapi.sh" || exit 1
20 > @@ -124,10 +124,11 @@ die() {
21 > set +x # tracing only produces useless noise here
22 > local IFS=$' \t\n'
23 >
24 > - if ___eapi_die_can_respect_nonfatal; then
25 > - if [[ ${1} == -n ]]; then
26 > - [[ ${PORTAGE_NONFATAL} == 1 ]] && return 1
27 > - shift
28 > + if ___eapi_die_can_respect_nonfatal && [[ $1 == -n ]]; then
29 > + shift
30 > + if [[ ${PORTAGE_NONFATAL} == 1 ]]; then
31 > + [[ $# -gt 0 ]] && eerror "$*"
32 > + return 1
33 > fi
34 > fi
35 >
36
37 looks good, you can push it I think can't you?
38
39 --
40 Brian Dolbec <dolsen>

Replies