* [gentoo-commits] portage r15101 - main/branches/2.1.7/bin
@ 2009-12-17 3:21 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-12-17 3:21 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2009-12-17 03:21:33 +0000 (Thu, 17 Dec 2009)
New Revision: 15101
Modified:
main/branches/2.1.7/bin/ebuild.sh
main/branches/2.1.7/bin/isolated-functions.sh
Log:
Bug #296870 - Allow locale related LANG and LC_* variables to persist between
ebuild phases, and only filter them for binary and installed packages.
(trunk r15096)
Modified: main/branches/2.1.7/bin/ebuild.sh
===================================================================
--- main/branches/2.1.7/bin/ebuild.sh 2009-12-17 02:20:58 UTC (rev 15100)
+++ main/branches/2.1.7/bin/ebuild.sh 2009-12-17 03:21:33 UTC (rev 15101)
@@ -1638,6 +1638,12 @@
# phase. However, if FEATURES exist inside environment.bz2 then they
# should be overridden by current settings.
#
+# --filter-locale causes locale related variables such as LANG and LC_*
+# variables to be filtered. These variables should persist between phases,
+# in case they are modified by the ebuild. However, the current user
+# settings should be used 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}.
#
@@ -1677,6 +1683,11 @@
if hasq --filter-features $* ; then
filtered_vars="${filtered_vars} FEATURES"
fi
+ if hasq --filter-locale $* ; then
+ filtered_vars+=" LANG LC_ALL LC_COLLATE
+ LC_CTYPE LC_MESSAGES LC_MONETARY
+ LC_NUMERIC LC_PAPER LC_TIME"
+ fi
if ! hasq --allow-extra-vars $* ; then
filtered_vars="
${filtered_vars}
@@ -1702,7 +1713,7 @@
# environment may contain stale SANDBOX_{DENY,PREDICT,READ,WRITE}
# and FEATURES variables that should be filtered out. Between
# phases, these variables are normally preserved.
- filter_opts="--filter-sandbox --filter-features ${filter_opts}"
+ filter_opts+=" --filter-sandbox --filter-features --filter-locale"
fi
filter_readonly_variables ${filter_opts} < "${T}"/environment \
> "${T}"/environment.filtered || return $?
Modified: main/branches/2.1.7/bin/isolated-functions.sh
===================================================================
--- main/branches/2.1.7/bin/isolated-functions.sh 2009-12-17 02:20:58 UTC (rev 15100)
+++ main/branches/2.1.7/bin/isolated-functions.sh 2009-12-17 03:21:33 UTC (rev 15101)
@@ -506,11 +506,6 @@
unset ECHANGELOG_USER GPG_AGENT_INFO \
SSH_AGENT_PID SSH_AUTH_SOCK STY WINDOW XAUTHORITY
- # localization settings
- unset LANG LC_COLLATE LC_CTYPE LC_MESSAGES \
- LC_MONETARY LC_NUMERIC LC_TIME LC_PAPER \
- LC_ALL
-
# CCACHE and DISTCC config
unset ${!CCACHE_*} ${!DISTCC_*}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-12-17 3:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-17 3:21 [gentoo-commits] portage r15101 - main/branches/2.1.7/bin Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox