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 33A7C15808A 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 BE88D341F88 for ; Tue, 22 Jul 2025 22:31:14 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 63D97110565; Tue, 22 Jul 2025 22:31:04 +0000 (UTC) Received: from smtp.gentoo.org (dev.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) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 57249110564 for ; Tue, 22 Jul 2025 22:31:04 +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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 096BE3415E2 for ; Tue, 22 Jul 2025 22:31:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7FAC9329D for ; Tue, 22 Jul 2025 22:31:01 +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: <1753223455.277a5b46dc0cfa7c0e6aaa680d9cc5f7b989ee41.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: 277a5b46dc0cfa7c0e6aaa680d9cc5f7b989ee41 X-VCS-Branch: master Date: Tue, 22 Jul 2025 22:31:01 +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: 3c734e92-5c16-4a08-af8e-f412a2b6ae3f X-Archives-Hash: 277ec51f30baa500351858d855fce811 commit: 277a5b46dc0cfa7c0e6aaa680d9cc5f7b989ee41 Author: Kerin Millar plushkava net> AuthorDate: Sun Jul 20 06:16:39 2025 +0000 Commit: Sam James gentoo org> CommitDate: Tue Jul 22 22:30:55 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=277a5b46 isolated-functions.sh: rectify six unquoted parameter expansions Rectify six instances in which unquoted parameter expansions are performed (SC2086). Three of these concern the die() function, two concern the eend() function, and one concerns the __set_colors() function. Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/isolated-functions.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index 9270a344d4..fbb4c6ced4 100644 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -141,7 +141,7 @@ die() { local main_index (( main_index = ${#BASH_SOURCE[@]} - 1 )) if [[ ${BASH_SOURCE[main_index]##*/} == @(ebuild|misc-functions).sh ]]; then - __dump_trace 2 ${filespacing} ${linespacing} + __dump_trace 2 "${filespacing}" "${linespacing}" eerror " $(printf "%${filespacing}s" "${BASH_SOURCE[1]##*/}"), line $(printf "%${linespacing}s" "${BASH_LINENO[0]}"): Called die" eerror "The specific snippet of code:" # This scans the file that called die and prints out the logic that @@ -341,7 +341,7 @@ __eend() { printf "%$(( COLS - LAST_E_LEN - 7 ))s%b\n" '' "${msg}" >&2 fi - return ${retval} + return "${retval}" } eend() { @@ -353,10 +353,10 @@ eend() { eqawarn "QA Notice: eend called without preceding ebegin in ${FUNCNAME[1]}" fi - __eend ${retval} eerror "$*" + __eend "${retval}" eerror "$*" LAST_E_CMD="eend" - return ${retval} + return "${retval}" } __unset_colors() { @@ -391,8 +391,10 @@ __set_colors() { # Now, ${ENDCOL} will move us to the end of the # column; regardless of character width ENDCOL=$'\e[A\e['$(( COLS - 8 ))'C' - if [[ -n "${PORTAGE_COLORMAP}" ]]; then - eval ${PORTAGE_COLORMAP} + if [[ ${PORTAGE_COLORMAP} ]]; then + # The PORTAGE_COLORMAP environment variable is defined by the + # doebuild.py unit and is intended to be evaluated as code. + eval "${PORTAGE_COLORMAP}" else PORTAGE_COLOR_BAD=$'\e[31;01m' PORTAGE_COLOR_BRACKET=$'\e[34;01m'