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

svn path=/main/branches/2.1.7/; revision=15009

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 0690267fa38af6cbdaaff3e780780b06ca73c8cf..6b8d44cb77d68593669f8a1d97ff0264ebe2b127 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",