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 E3DAF15806C for ; Sun, 13 Jul 2025 04:20:21 +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 CF436341F73 for ; Sun, 13 Jul 2025 04:20:21 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 36229110569; Sun, 13 Jul 2025 04:19:55 +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 302FD110569 for ; Sun, 13 Jul 2025 04:19:55 +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 DB7A7341F0F for ; Sun, 13 Jul 2025 04:19:54 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 86BAB3104 for ; Sun, 13 Jul 2025 04:19:51 +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: <1752380346.44cc0ab2caf13a18cbb99580b91a8afe61ce9cc4.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/save-ebuild-env.sh X-VCS-Directories: bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 44cc0ab2caf13a18cbb99580b91a8afe61ce9cc4 X-VCS-Branch: master Date: Sun, 13 Jul 2025 04:19:51 +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: 7f01ef33-69b2-4fc4-9788-c31fa547d00a X-Archives-Hash: 129cb7d29ac5c25e5e14c5c9708885dc commit: 44cc0ab2caf13a18cbb99580b91a8afe61ce9cc4 Author: Kerin Millar plushkava net> AuthorDate: Tue Jul 8 01:07:33 2025 +0000 Commit: Sam James gentoo org> CommitDate: Sun Jul 13 04:19:06 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=44cc0ab2 save-ebuild-env.sh: clear triple-underscore namespace just before printing declarations Presently, the __save_ebuild_env() function contains a routine that is responsible for unsetting functions and variables whose names lead with three consecutive underscores. Reposition this routine so that it immediately precedes the invocations of the declare builtin that conclude the function. This is to support an impending refactoring. Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/save-ebuild-env.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh index 5d5d25bbd7..a162334374 100644 --- a/bin/save-ebuild-env.sh +++ b/bin/save-ebuild-env.sh @@ -90,14 +90,6 @@ __save_ebuild_env() ( ___eapi_has_in_iuse && unset -f in_iuse ___eapi_has_version_functions && unset -f ver_cut ver_rs ver_test - # Clear out the triple underscore namespace as it is reserved by the PM. - while IFS=' ' read -r _ _ REPLY; do - if [[ ${REPLY} == ___* ]]; then - unset -f "${REPLY}" - fi - done < <(declare -F) - unset -v REPLY "${!___@}" - # portage config variables and variables set directly by portage unset ACCEPT_LICENSE BUILD_PREFIX COLS \ DISTDIR DOC_SYMLINKS_DIR \ @@ -127,6 +119,14 @@ __save_ebuild_env() ( # user config variables unset DOC_SYMLINKS_DIR INSTALL_MASK PKG_INSTALL_MASK + # Clear out the triple underscore namespace as it is reserved by the PM. + while IFS=' ' read -r _ _ REPLY; do + if [[ ${REPLY} == ___* ]]; then + unset -f "${REPLY}" + fi + done < <(declare -F) + unset -v REPLY "${!___@}" + declare -p declare -fp )