Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: bin/
Date: Thu, 22 Dec 2011 04:07:03
Message-Id: 7ae2254d1e8db0e3976b82c65a8640cfc99cedb1.zmedico@gentoo
1 commit: 7ae2254d1e8db0e3976b82c65a8640cfc99cedb1
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Thu Dec 22 04:06:36 2011 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 22 04:06:36 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=7ae2254d
7
8 filter_readonly_variables: preserve binpkg vars
9
10 ---
11 bin/phase-functions.sh | 4 +++-
12 1 files changed, 3 insertions(+), 1 deletions(-)
13
14 diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
15 index 26ffde6..482fd6a 100644
16 --- a/bin/phase-functions.sh
17 +++ b/bin/phase-functions.sh
18 @@ -74,6 +74,8 @@ PORTAGE_MUTABLE_FILTERED_VARS="AA HOSTNAME"
19 #
20 # ---allow-extra-vars causes some extra vars to be allowd through, such
21 # as ${PORTAGE_SAVED_READONLY_VARS} and ${PORTAGE_MUTABLE_FILTERED_VARS}.
22 +# This is enabled automatically if EMERGE_FROM=binary, since it preserves
23 +# variables from when the package was originally built.
24 #
25 # In bash-3.2_p20+ an attempt to assign BASH_*, FUNCNAME, GROUPS or any
26 # readonly variable cause the shell to exit while executing the "source"
27 @@ -122,7 +124,7 @@ filter_readonly_variables() {
28 LC_CTYPE LC_MESSAGES LC_MONETARY
29 LC_NUMERIC LC_PAPER LC_TIME"
30 fi
31 - if ! has --allow-extra-vars $* ; then
32 + if [[ ${EMERGE_FROM} != binary ]] && ! has --allow-extra-vars $* ; then
33 filtered_vars="
34 ${filtered_vars}
35 ${PORTAGE_SAVED_READONLY_VARS}