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 94E2B158074 for ; Sat, 28 Jun 2025 02:31:19 +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 80602341607 for ; Sat, 28 Jun 2025 02:31:19 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id D8F2D110571; Sat, 28 Jun 2025 02:30:39 +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 D032B110571 for ; Sat, 28 Jun 2025 02:30:39 +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 82F49340E9A for ; Sat, 28 Jun 2025 02:30:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BCD3D2AA2 for ; Sat, 28 Jun 2025 02:30:36 +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: <1751077824.9c80c1b5ee3bfe832a114f33970f0dbad7c3f713.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/phase-functions.sh X-VCS-Directories: bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 9c80c1b5ee3bfe832a114f33970f0dbad7c3f713 X-VCS-Branch: master Date: Sat, 28 Jun 2025 02:30:36 +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: c2d86899-7d11-400a-ab65-c67e8c5c7004 X-Archives-Hash: cad8900d57fe036f99c5dac1b9b1bca1 commit: 9c80c1b5ee3bfe832a114f33970f0dbad7c3f713 Author: Kerin Millar plushkava net> AuthorDate: Fri Jun 27 08:22:11 2025 +0000 Commit: Sam James gentoo org> CommitDate: Sat Jun 28 02:30:24 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=9c80c1b5 phase-functions.sh: merge bash_misc_vars and readonly_bash_vars Presently, the __filter_readonly_variables() function declares two array variables named 'bash_misc_vars' and 'readonly_bash_vars'. The distinction between them isn't important enough to merit two separate variables, as should become clear upon further refactoring of the function. Merge these two arrays into one that is named 'bash_vars'. Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/phase-functions.sh | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh index a2325a76a4..dee18d3ceb 100644 --- a/bin/phase-functions.sh +++ b/bin/phase-functions.sh @@ -86,17 +86,15 @@ PORTAGE_MUTABLE_FILTERED_VARS="AA HOSTNAME" # builtin command. To avoid this problem, this function filters those # variables out and discards them. See bug #190128. __filter_readonly_variables() { - local -a {binpkg_untrusted,filtered_sandbox,readonly_bash,misc_garbage,bash_misc}_vars words + local -a {binpkg_untrusted,filtered_sandbox,misc_garbage,bash}_vars words local IFS - readonly_bash_vars=( - BASHOPTS BASHPID DIRSTACK EUID FUNCNAME GROUPS PIPESTATUS PPID - SHELLOPTS UID - ) - bash_misc_vars=( - BASH "BASH_.*" COLUMNS COMP_WORDBREAKS HISTCMD HISTFILE - HOSTNAME HOSTTYPE IFS LINENO MACHTYPE OLDPWD OPTERR OPTIND - OSTYPE POSIXLY_CORRECT PS4 PWD RANDOM SECONDS SHLVL _ + bash_vars=( + "BASH_.*" BASH BASHOPTS BASHPID COLUMNS COMP_WORDBREAKS + DIRSTACK EUID FUNCNAME GROUPS HISTCMD HISTFILE HOSTNAME + HOSTTYPE IFS LINENO MACHTYPE OLDPWD OPTERR OPTIND OSTYPE + PIPESTATUS POSIXLY_CORRECT PPID PS4 PWD RANDOM SECONDS + SHELLOPTS SHLVL UID _ ) filtered_sandbox_vars=( SANDBOX_ACTIVE SANDBOX_BASHRC SANDBOX_DEBUG_LOG @@ -111,9 +109,8 @@ __filter_readonly_variables() { ) read -rd '' -a words <<<"${PORTAGE_READONLY_VARS}" filtered_vars+=( - "${readonly_bash_vars[@]}" "${misc_garbage_vars[@]}" - "${bash_misc_vars[@]}" + "${bash_vars[@]}" "${words[@]}" "___.*" )