When ROOT != "/" we only want overrides from the calling
authorZac Medico <zmedico@gentoo.org>
Tue, 20 Nov 2007 05:49:37 +0000 (05:49 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 20 Nov 2007 05:49:37 +0000 (05:49 -0000)
environment to apply to the config that's associated
with ROOT != "/", so we wipe out the "backupenv" for the
config that is associated with ROOT == "/" and regenerate
it's incrementals. Thanks to solar for the suggestion.

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

pym/portage/__init__.py

index 74a6d853c9c5f18ba418addd275edf6429f9b265..0146d84315c7aece019a74b11d7fed1b4f9b5999 100644 (file)
@@ -5765,6 +5765,13 @@ def create_trees(config_root=None, target_root=None, trees=None):
        if settings["ROOT"] != "/":
                settings = config(config_root=None, target_root=None,
                        config_incrementals=portage.const.INCREMENTALS)
+               # When ROOT != "/" we only want overrides from the calling
+               # environment to apply to the config that's associated
+               # with ROOT != "/", so we wipe out the "backupenv" for the
+               # config that is associated with ROOT == "/" and regenerate
+               # it's incrementals.
+               settings.configdict["backupenv"].clear()
+               settings.regenerate()
                settings.lock()
                settings.validate()
                myroots.append((settings["ROOT"], settings))