For correct LINGUAS handling, don't export empty USE_EXPAND variables unless the...
authorZac Medico <zmedico@gentoo.org>
Wed, 13 Sep 2006 20:42:53 +0000 (20:42 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 13 Sep 2006 20:42:53 +0000 (20:42 -0000)
svn path=/main/trunk/; revision=4441

pym/portage.py

index af2ddb8ba6c4850d8ff791b2d3d005188d305ddc..821edb81f3b05e5071ff50be72e31825daf9e7d0 100644 (file)
@@ -1609,7 +1609,11 @@ class config:
                        # like LINGUAS.
                        var_split = [ x for x in var_split if x in expand_flags ]
                        var_split.extend(expand_flags.difference(var_split))
-                       self[var] = " ".join(var_split)
+                       if var_split or var in self:
+                               # Don't export empty USE_EXPAND vars unless the user config
+                               # exports them as empty.  This is required for vars such as
+                               # LINGUAS, where unset and empty have different meanings.
+                               self[var] = " ".join(var_split)
 
                # Pre-Pend ARCH variable to USE settings so '-*' in env doesn't kill arch.
                if self.configdict["defaults"].has_key("ARCH"):