commit: e89c41e3925f60c88e04d5a2798722ee476fdf03
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Tue Jul 8 23:24:56 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jul 13 04:19:05 2025 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e89c41e3
phase-functions.sh: improve the comment describing --allow-extra-vars behaviour
Presently, the "phase-functions.sh" unit contains a comment describing
the effect of the --allow-extra-vars option, as it pertains to the
__filter_readonly_variables() function. This comment contains two
typographical errors and does not properly describe the behaviour of the
option. Rectify these shortcomings.
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>
bin/phase-functions.sh | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index afe28c613f..58904cd80e 100644
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@ -76,10 +76,13 @@ PORTAGE_MUTABLE_FILTERED_VARS="AA HOSTNAME"
# However, old settings should be overridden when loading the
# environment from a binary or installed package.
#
-# ---allow-extra-vars causes some extra vars to be allowd through, such
-# as ${PORTAGE_SAVED_READONLY_VARS} and ${PORTAGE_MUTABLE_FILTERED_VARS}.
-# This is enabled automatically if EMERGE_FROM=binary, since it preserves
-# variables from when the package was originally built.
+# --allow-extra-vars inhibits the filtering of the variables whose names are
+# specified by the PORTAGE_SAVED_READONLY_VARS and
PORTAGE_MUTABLE_FILTERED_VARS
+# variables. However, in the absence of the option, only the CATEGORY, P, PF,
+# PN, PR, PV and PVR variables shall be filtered, provided that the value of
+# EMERGE_FROM is equal to "binary". The reason for this exception in behaviour
+# is to preserve various variables as they were at the time that the binary
+# package was built while protecting against the application of package
renames.
__filter_readonly_variables() {
local -a {binpkg_untrusted,filtered_sandbox,misc_garbage,bash}_vars
words
local IFS