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 016E315808A for ; Tue, 22 Jul 2025 22:26: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 DB8D7340FB1 for ; Tue, 22 Jul 2025 22:26:33 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id DE76611055E; Tue, 22 Jul 2025 22:26:32 +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 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id D82CE11055E for ; Tue, 22 Jul 2025 22:26:32 +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 92B06340F8F for ; Tue, 22 Jul 2025 22:26:32 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2899A322C for ; Tue, 22 Jul 2025 22:26:31 +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: <1753223138.6f3c0cb3cc826f355b34dafcbfee345f344f28ea.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/phase-helpers.sh X-VCS-Directories: bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 6f3c0cb3cc826f355b34dafcbfee345f344f28ea X-VCS-Branch: master Date: Tue, 22 Jul 2025 22:26:31 +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: f70c503f-538a-49c1-96ce-255369c33481 X-Archives-Hash: 714a2347890ca713fa8472e8e8915a0f commit: 6f3c0cb3cc826f355b34dafcbfee345f344f28ea Author: Kerin Millar plushkava net> AuthorDate: Sun Jul 13 09:48:04 2025 +0000 Commit: Sam James gentoo org> CommitDate: Tue Jul 22 22:25:38 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=6f3c0cb3 phase-helpers.sh: hoist locals to the top of eapply_user() Local variables are not lexically scoped in bash and it has been my experience that declaring them up-front can help to identify undue complexity. Do so for the eapply_user() function. Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/phase-helpers.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index fef77e52d7..5811a90658 100644 --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@ -1063,23 +1063,23 @@ fi if ___eapi_has_eapply_user; then eapply_user() { + local basename basedir columns tagfile hr d f + local -A patch_by + [[ ${EBUILD_PHASE} == prepare ]] || \ die "eapply_user() called during invalid phase: ${EBUILD_PHASE}" # Keep path in __dyn_prepare in sync! - local tagfile=${T}/.portage_user_patches_applied + tagfile=${T}/.portage_user_patches_applied [[ -f ${tagfile} ]] && return >> "${tagfile}" - local basedir=${PORTAGE_CONFIGROOT%/}/etc/portage/patches + basedir=${PORTAGE_CONFIGROOT%/}/etc/portage/patches - local columns=${COLUMNS:-0} + columns=${COLUMNS:-0} [[ ${columns} == 0 ]] && columns=$(set -- $( ( stty size /dev/null || echo 24 80 ) ; echo $2) (( columns > 0 )) || (( columns = 80 )) - local -A patch_by - local d f basename hr - # Patches from all matched directories are combined into a # sorted (POSIX order) list of the patch basenames. Patches # in more-specific directories override patches of the same