diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-06-30 08:27:59 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-06-30 08:27:59 +0000 |
commit | 3cb13dc3fb35572f9f5f67507715747bb1d0863b (patch) | |
tree | ddd603818e175d2a4a307d2cd08b814e1d7292ee | |
parent | f4c2294623e713ce73fb84b90d601df56c7c0d2b (diff) | |
download | portage-3cb13dc3fb35572f9f5f67507715747bb1d0863b.tar.gz portage-3cb13dc3fb35572f9f5f67507715747bb1d0863b.tar.bz2 portage-3cb13dc3fb35572f9f5f67507715747bb1d0863b.zip |
Pass config and portdbapi instances into the portagetree constructor.
svn path=/main/trunk/; revision=3710
-rw-r--r-- | pym/portage.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pym/portage.py b/pym/portage.py index a72d2a1f4..66e003a31 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -7114,7 +7114,7 @@ class MtimeDB(dict): def commit(self): commit_mtimedb(mydict=self, filename=self.filename) -def do_vartree(mysettings, trees=None): +def do_vartree(mysettings, portdb=None, trees=None): if trees is None: global db trees = db @@ -7128,7 +7128,8 @@ def do_vartree(mysettings, trees=None): trees[myroot].addLazySingleton( "vartree", vartree, myroot, categories=mysettings.categories, settings=mysettings) - trees[myroot].addLazySingleton("porttree", portagetree, myroot) + trees[myroot].addLazySingleton("porttree", + portagetree, myroot, settings=mysettings, portdb=portdb) trees[myroot].addLazyItem("bintree", LazyBintreeItem(myroot, mysettings)) @@ -7166,8 +7167,8 @@ def init_legacy_globals(): root = settings["ROOT"] db={} - do_vartree(settings, trees=db) portdb = portdbapi(settings["PORTDIR"], mysettings=config(clone=settings)) + do_vartree(settings, portdb=portdb, trees=db) mtimedbfile = os.path.join("/", CACHE_PATH.lstrip(os.path.sep), "mtimedb") mtimedb = MtimeDB(mtimedbfile) |