When ROOT != "/" we only want overrides from the calling
authorZac Medico <zmedico@gentoo.org>
Wed, 21 Nov 2007 04:50:38 +0000 (04:50 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 21 Nov 2007 04:50:38 +0000 (04:50 -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.
(trunk r8539)

svn path=/main/branches/2.1.2/; revision=8571

pym/portage.py

index bf4aacdd533f1110ad25081d33c1f1edc3f2b095..6189bfe89e733c5f131bb0326033d9c88eee23ac 100644 (file)
@@ -9249,6 +9249,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))