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 8956E15827B for ; Mon, 25 Aug 2025 09:52:31 +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 71CCC341052 for ; Mon, 25 Aug 2025 09:52:31 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id DD53D110564; Mon, 25 Aug 2025 09:52:22 +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 D4C71110564 for ; Mon, 25 Aug 2025 09:52:22 +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 89592340FCB for ; Mon, 25 Aug 2025 09:52:22 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D3DFA34D9 for ; Mon, 25 Aug 2025 09:52:20 +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: <1756115491.13d7b83a2ecf1afb07be78c22bee27d794199793.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: 13d7b83a2ecf1afb07be78c22bee27d794199793 X-VCS-Branch: master Date: Mon, 25 Aug 2025 09:52:20 +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: 4d892df7-40a2-427d-9088-c2a9ddb50360 X-Archives-Hash: c1ac8cd7dc68bccbaf56458493b183da commit: 13d7b83a2ecf1afb07be78c22bee27d794199793 Author: Kerin Millar plushkava net> AuthorDate: Sun Aug 24 22:28:51 2025 +0000 Commit: Sam James gentoo org> CommitDate: Mon Aug 25 09:51:31 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=13d7b83a save-ebuild-env.sh: reformat identifier lists, one per line On the 15th July, the "save-ebuild-env.sh" unit was modified so as to declare the lists of identifiers that require unsetting as arrays, obviating the need for escaped characters as an awkward line continuation device. Additionally, these lists were reordered with a custom sorting algorithm, in an attempt to improve their legibility. Reformat these lists once again, such that there is only ever one identifier per line. I am now of the view that this is what I ought to have done in the first place, for the reasons described herewith. Firstly, humans are quite adept at reading columnated lists that are in an alphabetical order. Secondly, having there be only one identifier per line results in unified diffs that are much easier for humans to fathom in the case that identifiers are added, renamed and/or removed. Thirdly, merge conflicts become less likely to occur. Indeed, I found this change to be immediately beneficial in the course of rebasing my patch queue. Fourthly, contributors are duly relieved of the implied burden of maintaining the layout of the lists, above and beyond their contents. It should be noted that each group of identifiers has been sorted in a manner that is equivalent to LC_ALL=C sort. See-also: fd01f441afa9053cdbbf47252255d19693d299c9 Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/save-ebuild-env.sh | 306 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 238 insertions(+), 68 deletions(-) diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh index f2249c041d..c1e6858e64 100644 --- a/bin/save-ebuild-env.sh +++ b/bin/save-ebuild-env.sh @@ -19,13 +19,19 @@ __save_ebuild_env() ( if has --exclude-init-phases "$@"; then REPLY+=( - PORTAGE_DOCOMPRESS_SIZE_LIMIT PORTAGE_DOCOMPRESS_SKIP - PORTAGE_DOSTRIP_SKIP PORTAGE_DOCOMPRESS PORTAGE_DOSTRIP - S __E_DOCDESTTREE __E_EXEDESTTREE __E_INSDESTTREE - __E_DESTTREE - # Discard stale GNU Make POSIX Jobserver flags. MAKEFLAGS + + PORTAGE_DOCOMPRESS + PORTAGE_DOCOMPRESS_SIZE_LIMIT + PORTAGE_DOCOMPRESS_SKIP + PORTAGE_DOSTRIP + PORTAGE_DOSTRIP_SKIP + S + __E_DESTTREE + __E_DOCDESTTREE + __E_EXEDESTTREE + __E_INSDESTTREE ) if [[ -n ${PYTHONPATH} && ${PYTHONPATH%%:*} -ef ${PORTAGE_PYM_PATH} ]] ; then @@ -38,78 +44,242 @@ __save_ebuild_env() ( fi REPLY+=( - # variables that can influence the behaviour of GNU coreutils - BLOCK_SIZE COLORTERM COLUMNS DF_BLOCK_SIZE DU_BLOCK_SIZE HOME - LS_BLOCK_SIZE LS_COLORS POSIXLY_CORRECT PWD QUOTING_STYLE - SHELL TIME_STYLE TABSIZE TMPDIR TERM TZ - - # misc variables inherited from the calling environment - DISPLAY EDITOR LESSOPEN LOGNAME LESS PAGER TERMCAP USER - ftp_proxy https_proxy http_proxy no_proxy - - # other variables inherited from the calling environment - "${!SSH_@}" "${!XDG_CURRENT_@}" "${!XDG_RUNTIME_@}" - "${!XDG_SESSION_@}" "${!XDG_CONFIG_@}" "${!XDG_DATA_@}" - "${!XDG_MENU_@}" "${!XDG_SEAT_@}" CVS_RSH ECHANGELOG_USER - GPG_AGENT_INFO STY WINDOW XAUTHORITY XDG_VTNR - - # portage config variables and variables set directly by portage - ACCEPT_LICENSE BUILD_PREFIX COLS DOC_SYMLINKS_DIR DISTDIR - EBUILD_FORCE_TEST EBUILD_MASTER_PID ECLASS_DEPTH ENDCOL - FAKEROOTKEY HOME LAST_E_CMD LAST_E_LEN LD_PRELOAD - MISC_FUNCTIONS_ARGS MOPREFIX NO_COLOR NOCOLOR + # Variables that can influence the behaviour of GNU coreutils. + BLOCK_SIZE + COLORTERM + COLUMNS + DF_BLOCK_SIZE + DU_BLOCK_SIZE + HOME + LS_BLOCK_SIZE + LS_COLORS + POSIXLY_CORRECT + PWD + QUOTING_STYLE + SHELL + TABSIZE + TERM + TIME_STYLE + TMPDIR + TZ + + # Miscellaneous variables inherited from the operating environment. + DISPLAY + EDITOR + LESS + LESSOPEN + LOGNAME + PAGER + TERMCAP + USER + ftp_proxy + http_proxy + https_proxy + no_proxy + + # Other variables inherited from the operating environment. + "${!SSH_@}" + "${!XDG_CONFIG_@}" + "${!XDG_CURRENT_@}" + "${!XDG_DATA_@}" + "${!XDG_MENU_@}" + "${!XDG_RUNTIME_@}" + "${!XDG_SEAT_@}" + "${!XDG_SESSION_@}" + CVS_RSH + ECHANGELOG_USER + GPG_AGENT_INFO + STY + WINDOW + XAUTHORITY + XDG_VTNR + + # Portage config variables and variables set directly by portage. + ACCEPT_LICENSE + BUILD_PREFIX + COLS + DISTDIR + DOC_SYMLINKS_DIR + EBUILD_FORCE_TEST + EBUILD_MASTER_PID + ECLASS_DEPTH + ENDCOL + FAKEROOTKEY + HOME + LAST_E_CMD + LAST_E_LEN + LD_PRELOAD + MISC_FUNCTIONS_ARGS + MOPREFIX + NOCOLOR + NO_COLOR + PKGDIR + PKGUSE + PKG_LOGDIR + PKG_TMPDIR + PORTAGE_BASHRCS_SOURCED + PORTAGE_BASHRC_FILES + PORTAGE_COLOR_BAD + PORTAGE_COLOR_BRACKET + PORTAGE_COLOR_ERR + PORTAGE_COLOR_GOOD + PORTAGE_COLOR_HILITE + PORTAGE_COLOR_INFO + PORTAGE_COLOR_LOG + PORTAGE_COLOR_NORMAL + PORTAGE_COLOR_QAWARN + PORTAGE_COLOR_WARN + PORTAGE_COMPRESS + PORTAGE_COMPRESS_EXCLUDE_SUFFIXES PORTAGE_DOHTML_UNWARNED_SKIPPED_EXTENSIONS PORTAGE_DOHTML_UNWARNED_SKIPPED_FILES PORTAGE_DOHTML_WARN_ON_SKIPPED_FILES - PORTAGE_COMPRESS_EXCLUDE_SUFFIXES PORTAGE_BASHRCS_SOURCED - PORTAGE_SANDBOX_PREDICT PORTAGE_COLOR_BRACKET - PORTAGE_SANDBOX_WRITE PORTAGE_BASHRC_FILES PORTAGE_COLOR_HILITE - PORTAGE_COLOR_NORMAL PORTAGE_COLOR_QAWARN PORTAGE_SANDBOX_DENY - PORTAGE_SANDBOX_READ PORTAGE_SOCKS5_PROXY PORTAGE_COLOR_GOOD - PORTAGE_COLOR_INFO PORTAGE_COLOR_WARN PORTAGE_COLOR_BAD - PORTAGE_COLOR_ERR PORTAGE_COLOR_LOG PORTAGE_COMPRESS - PORTAGE_NONFATAL PORTAGE_QUIET PREROOTPATH PKG_LOGDIR - PKG_TMPDIR PKGDIR PKGUSE QA_INTERCEPTORS RC_DOT_PATTERN - RC_INDENTATION RC_ENDCOL ROOTPATH RPMDIR ROOT TMPDIR TEMP TMP - USE_EXPAND XARGS _RC_GET_KV_CACHE - - # user config variables - DOC_SYMLINKS_DIR INSTALL_MASK PKG_INSTALL_MASK - - # CCACHE and DISTCC config - "${!CCACHE_@}" "${!DISTCC_@}" + PORTAGE_NONFATAL + PORTAGE_QUIET + PORTAGE_SANDBOX_DENY + PORTAGE_SANDBOX_PREDICT + PORTAGE_SANDBOX_READ + PORTAGE_SANDBOX_WRITE + PORTAGE_SOCKS5_PROXY + PREROOTPATH + QA_INTERCEPTORS + RC_DOT_PATTERN + RC_ENDCOL + RC_INDENTATION + ROOT + ROOTPATH + RPMDIR + TEMP + TMP + TMPDIR + USE_EXPAND + XARGS + _RC_GET_KV_CACHE + + # User config variables. + DOC_SYMLINKS_DIR + INSTALL_MASK + PKG_INSTALL_MASK + + # CCACHE and DISTCC configuration variables. + "${!CCACHE_@}" + "${!DISTCC_@}" ) # Unset the collected variables before moving on to functions. unset -v "${REPLY[@]}" REPLY=( - EXPORT_FUNCTIONS KV_to_int KV_major KV_micro KV_minor - - __abort_configure __abort_compile __abort_handler - __abort_install __abort_prepare __abort_test - __check_bash_version __compose_bzip2_cmd __dyn_configure - __dyn_compile __dyn_install __dyn_prepare __dyn_pretend - __dump_trace __dyn_unpack __dyn_clean __dyn_setup __dyn_help - __dyn_test __ebuild_phase_with_hooks __ebuild_arg_to_phase - __ebuild_phase_funcs __ebuild_phase __ebuild_main __elog_base - __eqaquote __eqatag __eend __filter_readonly_variables - __has_phase_defined_up_to __helpers_die __hasgq __hasg - __preprocess_ebuild_env __quiet_mode __qa_source __qa_call - __repo_attr __strip_duplicate_slashes __source_all_bashrcs - __source_env_files __save_ebuild_env __sb_append_var - __start_distcc __set_colors __try_source __unset_colors - __unpack_tar __vecho __ver_compare __ver_compare_int - __ver_parse_range __ver_split - - addpredict addwrite adddeny addread assert best_version - contains_word configparser debug-print-function - debug-print-section debug-print docompress default diropts - docinto dostrip die einstall eqawarn exeinto exeopts ebegin - eerror einfon econf einfo ewarn eend elog find0 get_KV - has_version hasq hasv has inherit insinto insopts into libopts - nonfatal portageq register_success_hook register_die_hook - use_enable use_with unpack useq usev use + EXPORT_FUNCTIONS + KV_major + KV_micro + KV_minor + KV_to_int + + __abort_compile + __abort_configure + __abort_handler + __abort_install + __abort_prepare + __abort_test + __check_bash_version + __compose_bzip2_cmd + __dump_trace + __dyn_clean + __dyn_compile + __dyn_configure + __dyn_help + __dyn_install + __dyn_prepare + __dyn_pretend + __dyn_setup + __dyn_test + __dyn_unpack + __ebuild_arg_to_phase + __ebuild_main + __ebuild_phase + __ebuild_phase_funcs + __ebuild_phase_with_hooks + __eend + __elog_base + __eqaquote + __eqatag + __filter_readonly_variables + __has_phase_defined_up_to + __hasg + __hasgq + __helpers_die + __preprocess_ebuild_env + __qa_call + __qa_source + __quiet_mode + __repo_attr + __save_ebuild_env + __sb_append_var + __set_colors + __source_all_bashrcs + __source_env_files + __start_distcc + __strip_duplicate_slashes + __try_source + __unpack_tar + __unset_colors + __vecho + __ver_compare + __ver_compare_int + __ver_parse_range + __ver_split + + adddeny + addpredict + addread + addwrite + assert + best_version + configparser + contains_word + debug-print + debug-print-function + debug-print-section + default + die + diropts + docinto + docompress + dostrip + ebegin + econf + eend + eerror + einfo + einfon + einstall + elog + eqawarn + ewarn + exeinto + exeopts + find0 + get_KV + has + has_version + hasq + hasv + inherit + insinto + insopts + into + libopts + nonfatal + portageq + register_die_hook + register_success_hook + unpack + use + use_enable + use_with + useq + usev # Defined by the "ebuild.sh" utility. ${QA_INTERCEPTORS}