From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 1CCE9158147 for ; Tue, 22 Jul 2025 22:31:34 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 6106B340FD9 for ; Tue, 22 Jul 2025 22:31:06 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id D3D5E11055F; Tue, 22 Jul 2025 22:31:02 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id C685511055F for ; Tue, 22 Jul 2025 22:31:02 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7F7253415DF for ; Tue, 22 Jul 2025 22:31:02 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id ED0AA3294 for ; Tue, 22 Jul 2025 22:31:00 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1753223452.85d8343bf0dcc5e9aeab3a54b1b83db4dd3ec89f.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/isolated-functions.sh X-VCS-Directories: bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 85d8343bf0dcc5e9aeab3a54b1b83db4dd3ec89f X-VCS-Branch: master Date: Tue, 22 Jul 2025 22:31:00 +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: 891737c4-b495-4613-9849-d422e3ccba11 X-Archives-Hash: 06ce69009c82fcebd6a8e884c993fa0b commit: 85d8343bf0dcc5e9aeab3a54b1b83db4dd3ec89f Author: Kerin Millar plushkava net> AuthorDate: Sun Jul 20 05:29:36 2025 +0000 Commit: Sam James gentoo org> CommitDate: Tue Jul 22 22:30:52 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=85d8343b isolated-functions.sh: don't validate the first parameter in __elog_base() Presently, the __elog_base() helper function validates the first positional parameter, which is expected to be any of "INFO", "WARN", "ERROR", "LOG" or "QA". To do so is futile because there are only six instances in which the function is invoked, all of which hard-code one of these expected values. Drop the validation code. Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/isolated-functions.sh | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index 23348b918c..ed66dcbe48 100644 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -230,7 +230,9 @@ __vecho() { # Internal logging function, don't use this in ebuilds __elog_base() { - local messagetype + local messagetype=$1 + shift + if [[ ${EBUILD_PHASE} == depend && -z ${__PORTAGE_ELOG_BANNER_OUTPUT} ]]; then # in depend phase, we want to output a banner indicating which # package emitted the message @@ -239,16 +241,6 @@ __elog_base() { __PORTAGE_ELOG_BANNER_OUTPUT=1 fi [[ -z "${1}" || -z "${T}" || ! -d "${T}/logging" ]] && return 1 - case "${1}" in - INFO|WARN|ERROR|LOG|QA) - messagetype="${1}" - shift - ;; - *) - __vecho -e " ${PORTAGE_COLOR_BAD}*${PORTAGE_COLOR_NORMAL} Invalid use of internal function __elog_base(), next message will not be logged" - return 1 - ;; - esac echo -e "$@" | while read -r ; do echo "${messagetype} ${REPLY}" done >> "${T}/logging/${EBUILD_PHASE:-other}"