summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-10-27 01:46:37 +0000
committerZac Medico <zmedico@gentoo.org>2007-10-27 01:46:37 +0000
commit0d40f01fdf13b0a84e8b3d7f7f53f285aafc10ad (patch)
treee703cbbfd50f514515fe185caccc5ff718c31ee9
parentbc31ddb2641a30f6ac28e3bf4b536af8d2a7a022 (diff)
downloadportage-0d40f01fdf13b0a84e8b3d7f7f53f285aafc10ad.tar.gz
portage-0d40f01fdf13b0a84e8b3d7f7f53f285aafc10ad.tar.bz2
portage-0d40f01fdf13b0a84e8b3d7f7f53f285aafc10ad.zip
Fix broken $ROOT handling for setconfig in the MergeTask
constructor. svn path=/main/trunk/; revision=8317
-rw-r--r--pym/_emerge/__init__.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index e6ccc39b8..5b793eca3 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -3702,10 +3702,10 @@ class MergeTask(object):
if settings.get("PORTAGE_DEBUG", "") == "1":
self.edebug = 1
self.pkgsettings = {}
- self.pkgsettings[self.target_root] = EmergeConfig(settings, setconfig=settings.setconfig)
- if self.target_root != "/":
- self.pkgsettings["/"] = \
- EmergeConfig(trees["/"]["vartree"].settings, setconfig=settings.setconfig)
+ for root in trees:
+ self.pkgsettings[root] = EmergeConfig(
+ trees[root]["vartree"].settings,
+ setconfig=trees[root]["vartree"].settings.setconfig)
self.curval = 0
def merge(self, mylist, favorites, mtimedb):
@@ -6324,14 +6324,18 @@ def load_emerge_config(trees=None):
kwargs[k] = os.environ.get(envvar, None)
trees = portage.create_trees(trees=trees, **kwargs)
+ for root in trees:
+ settings = trees[root]["vartree"].settings
+ settings = EmergeConfig(settings, trees=trees[root])
+ settings.lock()
+ trees[root]["vartree"].settings = settings
+
settings = trees["/"]["vartree"].settings
for myroot in trees:
if myroot != "/":
settings = trees[myroot]["vartree"].settings
break
-
- settings = EmergeConfig(settings, trees=trees[settings["ROOT"]])
mtimedbfile = os.path.join("/", portage.CACHE_PATH.lstrip(os.path.sep), "mtimedb")
mtimedb = portage.MtimeDB(mtimedbfile)