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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3984015802C for ; Sun, 15 Dec 2024 07:58:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 80113E0829; Sun, 15 Dec 2024 07:58:06 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6B359E0829 for ; Sun, 15 Dec 2024 07:58:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A6BC4342F9E for ; Sun, 15 Dec 2024 07:58:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 414D4EB9 for ; Sun, 15 Dec 2024 07:58:04 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1734214733.9f877651bfd0940cdf271456425edbbec7fc60bd.ulm@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/, / X-VCS-Repository: proj/portage X-VCS-Files: NEWS bin/isolated-functions.sh X-VCS-Directories: / bin/ X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 9f877651bfd0940cdf271456425edbbec7fc60bd X-VCS-Branch: master Date: Sun, 15 Dec 2024 07:58:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e43a6a16-8481-4953-91fb-ad03d1caf00a X-Archives-Hash: 2d3a20bddd08fcada9d4d41ddf149735 commit: 9f877651bfd0940cdf271456425edbbec7fc60bd Author: Ulrich Müller gentoo org> AuthorDate: Sat Dec 14 17:31:39 2024 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Sat Dec 14 22:18:53 2024 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=9f877651 eend: Make missing argument an error PMS says about eend: "Takes one fixed argument, which is a numeric return code, and an optional message in all subsequent arguments." A QA notice was in place since commit 95cd9583d415 in 2021. Bug: https://bugs.gentoo.org/703520 Signed-off-by: Ulrich Müller gentoo.org> NEWS | 2 ++ bin/isolated-functions.sh | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index da1f8353b3..c4b2ee5a54 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,8 @@ Bug fixes: * save-ebuild-env.sh: Add functions from newer EAPIs to filter list +* eend: Missing argument is now an error (bug #703520). + portage-3.0.66.1 (2024-09-18) -------------- diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index 06be030fb3..cbd93fce97 100644 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 source "${PORTAGE_BIN_PATH}/eapi.sh" || exit 1 @@ -367,13 +367,13 @@ __eend() { } eend() { - [[ -n $1 ]] || eqawarn "QA Notice: eend called without first argument" + [[ -n ${1} ]] || die "${FUNCNAME}(): Missing argument" + local retval=${1} + shift if (( --__EBEGIN_EEND_COUNT < 0 )); then __EBEGIN_EEND_COUNT=0 eqawarn "QA Notice: eend called without preceding ebegin in ${FUNCNAME[1]}" fi - local retval=${1:-0} - shift __eend ${retval} eerror "$*"