Gentoo Archives: gentoo-portage-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-portage-dev@l.g.o
Cc: "Ulrich Müller" <ulm@g.o>
Subject: Re: [gentoo-portage-dev] [PATCH] eend: Output QA notice when called without argument
Date: Fri, 03 Sep 2021 18:14:27
Message-Id: 4162671ab14064d202e9a1eec40366b04e2fbe10.camel@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH] eend: Output QA notice when called without argument by "Ulrich Müller"
1 On Fri, 2021-09-03 at 18:58 +0200, Ulrich Müller wrote:
2 > PMS says about eend: "Takes one fixed argument, which is a numeric
3 > return code, and an optional message in all subsequent arguments."
4 >
5 > Bug: https://bugs.gentoo.org/703520
6 > Signed-off-by: Ulrich Müller <ulm@g.o>
7 > ---
8 > bin/isolated-functions.sh | 1 +
9 > 1 file changed, 1 insertion(+)
10 >
11 > diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
12 > index b495ae6c7..5b1f372d2 100644
13 > --- a/bin/isolated-functions.sh
14 > +++ b/bin/isolated-functions.sh
15 > @@ -364,6 +364,7 @@ __eend() {
16 > }
17 >
18 > eend() {
19 > + [[ -n $1 ]] || eqawarn "QA Notice: eend called without return code"
20 > local retval=${1:-0}
21 > shift
22 >
23
24 I think the message could be a bit confusing. Maybe say explicitly that
25 it's missing an argument.
26
27 --
28 Best regards,
29 Michał Górny

Replies