From 7ae2254d1e8db0e3976b82c65a8640cfc99cedb1 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 21 Dec 2011 20:06:36 -0800 Subject: filter_readonly_variables: preserve binpkg vars --- bin/phase-functions.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bin/phase-functions.sh') diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh index 26ffde6b4..482fd6ac2 100644 --- a/bin/phase-functions.sh +++ b/bin/phase-functions.sh @@ -74,6 +74,8 @@ PORTAGE_MUTABLE_FILTERED_VARS="AA HOSTNAME" # # ---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. # # In bash-3.2_p20+ an attempt to assign BASH_*, FUNCNAME, GROUPS or any # readonly variable cause the shell to exit while executing the "source" @@ -122,7 +124,7 @@ filter_readonly_variables() { LC_CTYPE LC_MESSAGES LC_MONETARY LC_NUMERIC LC_PAPER LC_TIME" fi - if ! has --allow-extra-vars $* ; then + if [[ ${EMERGE_FROM} != binary ]] && ! has --allow-extra-vars $* ; then filtered_vars=" ${filtered_vars} ${PORTAGE_SAVED_READONLY_VARS} -- cgit v1.2.3-1-g7c22