From 9389eb3ee19edddba8ddff8d878a7c663feaa8ce Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 1 Jul 2006 05:57:08 +0000 Subject: [PATCH] Pass a more dbapi instances into doebuild to avoid dependence on global variables. svn path=/main/trunk/; revision=3729 --- bin/emerge | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/bin/emerge b/bin/emerge index 45a4472a9..508436482 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1774,7 +1774,9 @@ class depgraph: try: ret = portage.doebuild(self.portdb.findname(x[2]), "fetch", x[1], self.pkgsettings, - cleanup=0, fetchonly=True, tree="porttree") + cleanup=0, fetchonly=True, + mydbapi=self.trees[x[1]]["porttree"].dbapi, + tree="porttree") except SystemExit: raise except Exception: @@ -1883,7 +1885,9 @@ class depgraph: sys.exit(retval) elif "noclean" not in self.pkgsettings.features: portage.doebuild(y, "clean", myroot, self.pkgsettings, - self.edebug, tree="porttree") + self.edebug, + mydbapi=self.trees[myroot]["porttree"].dbapi, + tree="porttree") else: short_msg = "emerge: ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[pkgindex]+" Clean" emergelog(xterm_titles, " === ("+str(mergecount)+\ @@ -2992,7 +2996,7 @@ def action_config(settings, trees, myopts, myfiles): mysettings = portage.config(clone=settings) portage.doebuild(ebuildpath, "config", settings["ROOT"], mysettings, debug=(settings.get("PORTAGE_DEBUG", "") == 1), cleanup=True, - tree="vartree") + mydbapi=trees[settings["ROOT"]]["vartree"].dbapi, tree="vartree") print def action_info(settings, trees, myopts): @@ -3377,7 +3381,9 @@ def action_build(settings, trees, mtimedb, edebug = 1 retval = portage.doebuild( y, "digest", settings["ROOT"], tmpsettings, edebug, - ("--pretend" in myopts), tree="porttree") + ("--pretend" in myopts), + mydbapi=trees[pkgline[1]]["porttree"].dbapi, + tree="porttree") if "--fetchonly" in myopts or "--fetch-all-uri" in myopts: pkglist = [] for pkg in mydepgraph.altlist(): -- 2.26.2