From: Zac Medico Date: Fri, 30 Jun 2006 08:27:59 +0000 (-0000) Subject: Pass config and portdbapi instances into the portagetree constructor. X-Git-Tag: v2.1.1~333 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3cb13dc3fb35572f9f5f67507715747bb1d0863b;p=portage.git Pass config and portdbapi instances into the portagetree constructor. svn path=/main/trunk/; revision=3710 --- 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)