public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH] eend: Output QA notice when called without argument
@ 2021-09-03 16:58 Ulrich Müller
  2021-09-03 18:14 ` Michał Górny
  0 siblings, 1 reply; 4+ messages in thread
From: Ulrich Müller @ 2021-09-03 16:58 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Ulrich Müller

PMS says about eend: "Takes one fixed argument, which is a numeric
return code, and an optional message in all subsequent arguments."

Bug: https://bugs.gentoo.org/703520
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
---
 bin/isolated-functions.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index b495ae6c7..5b1f372d2 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -364,6 +364,7 @@ __eend() {
 }
 
 eend() {
+	[[ -n $1 ]] || eqawarn "QA Notice: eend called without return code"
 	local retval=${1:-0}
 	shift
 
-- 
2.33.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [gentoo-portage-dev] [PATCH] eend: Output QA notice when called without argument
  2021-09-03 16:58 [gentoo-portage-dev] [PATCH] eend: Output QA notice when called without argument Ulrich Müller
@ 2021-09-03 18:14 ` Michał Górny
  2021-09-04  7:48   ` [gentoo-portage-dev] [PATCH v2] " Ulrich Müller
  0 siblings, 1 reply; 4+ messages in thread
From: Michał Górny @ 2021-09-03 18:14 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Ulrich Müller

On Fri, 2021-09-03 at 18:58 +0200, Ulrich Müller wrote:
> PMS says about eend: "Takes one fixed argument, which is a numeric
> return code, and an optional message in all subsequent arguments."
> 
> Bug: https://bugs.gentoo.org/703520
> Signed-off-by: Ulrich Müller <ulm@gentoo.org>
> ---
>  bin/isolated-functions.sh | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
> index b495ae6c7..5b1f372d2 100644
> --- a/bin/isolated-functions.sh
> +++ b/bin/isolated-functions.sh
> @@ -364,6 +364,7 @@ __eend() {
>  }
>  
>  eend() {
> +	[[ -n $1 ]] || eqawarn "QA Notice: eend called without return code"
>  	local retval=${1:-0}
>  	shift
>  

I think the message could be a bit confusing.  Maybe say explicitly that
it's missing an argument.

-- 
Best regards,
Michał Górny




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gentoo-portage-dev] [PATCH v2] eend: Output QA notice when called without argument
  2021-09-03 18:14 ` Michał Górny
@ 2021-09-04  7:48   ` Ulrich Müller
  2021-09-27 11:19     ` Ulrich Mueller
  0 siblings, 1 reply; 4+ messages in thread
From: Ulrich Müller @ 2021-09-04  7:48 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Ulrich Müller

PMS says about eend: "Takes one fixed argument, which is a numeric
return code, and an optional message in all subsequent arguments."

Bug: https://bugs.gentoo.org/703520
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
---
 bin/isolated-functions.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index b495ae6c7..5630dcf4c 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -364,6 +364,7 @@ __eend() {
 }
 
 eend() {
+	[[ -n $1 ]] || eqawarn "QA Notice: eend called without first argument"
 	local retval=${1:-0}
 	shift
 
-- 
2.33.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [gentoo-portage-dev] [PATCH v2] eend: Output QA notice when called without argument
  2021-09-04  7:48   ` [gentoo-portage-dev] [PATCH v2] " Ulrich Müller
@ 2021-09-27 11:19     ` Ulrich Mueller
  0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Mueller @ 2021-09-27 11:19 UTC (permalink / raw
  To: gentoo-portage-dev

[-- Attachment #1: Type: text/plain, Size: 203 bytes --]

>>>>> On Sat, 04 Sep 2021, Ulrich Müller wrote:

> PMS says about eend: "Takes one fixed argument, which is a numeric
> return code, and an optional message in all subsequent arguments."

Pushed.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-27 11:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-03 16:58 [gentoo-portage-dev] [PATCH] eend: Output QA notice when called without argument Ulrich Müller
2021-09-03 18:14 ` Michał Górny
2021-09-04  7:48   ` [gentoo-portage-dev] [PATCH v2] " Ulrich Müller
2021-09-27 11:19     ` Ulrich Mueller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox