Add localization variables (LANG and LC_*) to the environment whitelist and
authorZac Medico <zmedico@gentoo.org>
Wed, 9 Dec 2009 06:10:53 +0000 (06:10 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 9 Dec 2009 06:10:53 +0000 (06:10 -0000)
filter them from the saved environment (so user settings override those of
binary packages). Thanks to Fabio Erculiani <lxnay@g.o> for reporting.

svn path=/main/trunk/; revision=14975

bin/isolated-functions.sh
pym/portage/__init__.py

index 4f1ad1c6396cb6e1a669d961484aec6d4b8dc387..911f65bc2d36814d9fe9799d71e027feec5b0f14 100755 (executable)
@@ -506,6 +506,11 @@ save_ebuild_env() {
                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_*}
 
index 7b892a652db2a7e91a0bd409105b69910fb1dd77..9cfe88866da3d462bcda585926403df313bb0fcf 100644 (file)
@@ -1437,6 +1437,13 @@ class config(object):
                "TMPDIR", "TEMP", "TMP",
        ]
 
+       # localization settings
+       _environ_whitelist += [
+               "LANG", "LC_COLLATE", "LC_CTYPE", "LC_MESSAGES",
+               "LC_MONETARY", "LC_NUMERIC", "LC_TIME", "LC_PAPER",
+               "LC_ALL",
+       ]
+
        # other variables inherited from the calling environment
        _environ_whitelist += [
                "CVS_RSH", "ECHANGELOG_USER",