summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-11-27 18:52:26 +0000
committerZac Medico <zmedico@gentoo.org>2007-11-27 18:52:26 +0000
commitbd47e6ce877982222a7c3f624e2bffd471719cc3 (patch)
tree099a0e1478b26962bfc11b20df5cf92e59ba2a34
parentd0e0c760c50a3c25fe43a600e5f142cbc0150bb6 (diff)
downloadportage-bd47e6ce877982222a7c3f624e2bffd471719cc3.tar.gz
portage-bd47e6ce877982222a7c3f624e2bffd471719cc3.tar.bz2
portage-bd47e6ce877982222a7c3f624e2bffd471719cc3.zip
Bug #200229 - The gimp ebuild defines AA as a local variable. In order
to accomodate this, create a PORTAGE_MUTABLE_FILTERED_VARS list for variables that portage sets but doesn't mark readonly. In order to prevent changed values from causing unexpcted interference, they are filtered out of the environment when it is saved or loaded (any mutations do not persist). svn path=/main/trunk/; revision=8708
-rwxr-xr-xbin/ebuild.sh19
1 files changed, 11 insertions, 8 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 8772219c6..2648bdb42 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -1342,9 +1342,16 @@ READONLY_EBUILD_METADATA="DEPEND DESCRIPTION
EAPI HOMEPAGE INHERITED IUSE KEYWORDS LICENSE
PDEPEND PROVIDE RDEPEND RESTRICT SLOT SRC_URI"
-READONLY_PORTAGE_VARS="D EBUILD EBUILD_PHASE \
- EBUILD_SH_ARGS EMERGE_FROM FILESDIR PORTAGE_BIN_PATH \
- PORTAGE_PYM_PATH PORTAGE_TMPDIR T WORKDIR"
+READONLY_PORTAGE_VARS="A CATEGORY D EBUILD EBUILD_PHASE \
+ EBUILD_SH_ARGS EMERGE_FROM FILESDIR P PF PN \
+ PORTAGE_BIN_PATH PORTAGE_PYM_PATH PORTAGE_MUTABLE_FILTERED_VARS \
+ PORTAGE_TMPDIR PR PV PVR T WORKDIR"
+
+# Variables that portage sets but doesn't mark readonly.
+# In order to prevent changed values from causing unexpected
+# interference, they are filtered out of the environment when
+# it is saved or loaded (any mutations do not persist).
+PORTAGE_MUTABLE_FILTERED_VARS="AA"
# @FUNCTION: filter_readonly_variables
# @DESCRIPTION: [--filter-sandbox]
@@ -1367,7 +1374,7 @@ filter_readonly_variables() {
SANDBOX_DEBUG_LOG SANDBOX_DISABLED SANDBOX_LIB
SANDBOX_LOG"
filtered_vars="${readonly_bash_vars} ${READONLY_PORTAGE_VARS}
- BASH_[_[:alnum:]]*"
+ ${PORTAGE_MUTABLE_FILTERED_VARS} BASH_[_[:alnum:]]*"
if hasq --filter-sandbox $* ; then
filtered_vars="${filtered_vars} SANDBOX_[_[:alnum:]]*"
else
@@ -1659,10 +1666,6 @@ export TMPDIR="${T}"
# declare them only after it has already run.
if [ "${EBUILD_PHASE}" != "depend" ] ; then
declare -r ${READONLY_EBUILD_METADATA} ${READONLY_PORTAGE_VARS}
- for x in A AA CATEGORY EMERGE_FROM P PF PN PR PV PVR ; do
- [[ ${!x-UNSET_VAR} != UNSET_VAR ]] && declare -r ${x}
- done
- unset x
fi
if [ -n "${EBUILD_SH_ARGS}" ] ; then