summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-07-01 05:57:08 +0000
committerZac Medico <zmedico@gentoo.org>2006-07-01 05:57:08 +0000
commit9389eb3ee19edddba8ddff8d878a7c663feaa8ce (patch)
tree277e3b772e15633a7381717de5ed1e47017ed3e1
parent2384a2348b37e66b02d28ff13ab3ea83c5e3df27 (diff)
downloadportage-9389eb3ee19edddba8ddff8d878a7c663feaa8ce.tar.gz
portage-9389eb3ee19edddba8ddff8d878a7c663feaa8ce.tar.bz2
portage-9389eb3ee19edddba8ddff8d878a7c663feaa8ce.zip
Pass a more dbapi instances into doebuild to avoid dependence on global variables.
svn path=/main/trunk/; revision=3729
-rwxr-xr-xbin/emerge14
1 files 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():