Fix portage.config handling of ROOT and PORTAGE_CONFIGROOT for bug #132442.
authorZac Medico <zmedico@gentoo.org>
Sat, 6 May 2006 18:37:18 +0000 (18:37 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 6 May 2006 18:37:18 +0000 (18:37 -0000)
svn path=/main/trunk/; revision=3326

pym/portage.py

index fd2f136405b18cb8b989185b514977d2472e0c3b..0d9a0e5afe8da3dc8194e05e802dbbc7e75698b3 100644 (file)
@@ -977,9 +977,6 @@ class config:
                                        writemsg("!!! Error: %s='%s' is not a directory. Please correct this.\n" % (k, v))
                                        raise portage_exception.DirectoryNotFound(v)
 
-                       self.backupenv["PORTAGE_CONFIGROOT"] = config_root
-                       self.backupenv["ROOT"] = target_root
-
                        self.depcachedir = DEPCACHE_PATH
 
                        if not config_profile_path:
@@ -1329,6 +1326,11 @@ class config:
                self.backupenv["PORTAGE_BIN_PATH"] = PORTAGE_BIN_PATH
                self.backupenv["PORTAGE_PYM_PATH"] = PORTAGE_PYM_PATH
 
+               self["PORTAGE_CONFIGROOT"] = config_root
+               self.backup_changes("PORTAGE_CONFIGROOT")
+               self["ROOT"] = target_root
+               self.backup_changes("ROOT")
+
                self._init_dirs()
 
        def _init_dirs(self):