commit: 1df2556c3aeebc64f64c5e6a2f92d9f4a68eb9da
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Tue Jul 15 16:09:50 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jul 22 22:28:40 2025 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=1df2556c
save-ebuild-env.sh: filter out variables that can influence coreutils
As of the time of writing, there are 18 variables that may influence the
behaviour of the utilities comprising the GNU coreutils project. Ensure
that they are filtered out by the __save_ebuild_env() function. Some,
such as 'HOME' and 'TMPDIR', continue to be specified elsewhere. Such is
harmless. I would sooner be thorough in the course of listing variables
that can be directly attributed to a given source.
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>
bin/save-ebuild-env.sh | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh
index 480854ad84..b71de06ed1 100644
--- a/bin/save-ebuild-env.sh
+++ b/bin/save-ebuild-env.sh
@@ -38,9 +38,14 @@ __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 PATH PWD QUOTING_STYLE
+ SHELL TIME_STYLE TABSIZE TMPDIR TERM TZ
+
# misc variables inherited from the calling environment
- COLORTERM DISPLAY EDITOR LS_COLORS LESSOPEN LOGNAME LESS PAGER
- TERMCAP TERM USER ftp_proxy https_proxy http_proxy no_proxy
+ DISPLAY EDITOR LESSOPEN LOGNAME LESS PAGER TERMCAP USER
+ ftp_proxy https_proxy http_proxy no_proxy
# other variables inherited from the calling environment
CVS_RSH ECHANGELOG_USER GPG_AGENT_INFO SSH_AGENT_PID