def eapi_is_supported(eapi):
return str(eapi).strip() == str(portage_const.EAPI).strip()
-def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, tree):
+def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, mydbapi):
ebuild_path = os.path.abspath(myebuild)
pkg_dir = os.path.dirname(ebuild_path)
mysettings["PORTAGE_QUIET"] = "1"
if mydo != "depend":
- mysettings["INHERITED"], mysettings["RESTRICT"] = db[root][tree].dbapi.aux_get( \
+ mysettings["INHERITED"], mysettings["RESTRICT"] = mydbapi.aux_get( \
mycpv,["INHERITED","RESTRICT"])
mysettings["PORTAGE_RESTRICT"]=string.join(flatten(portage_dep.use_reduce(portage_dep.paren_reduce( \
mysettings["RESTRICT"]), uselist=mysettings["USE"].split())),' ')
- eapi = db[root][tree].dbapi.aux_get(mycpv, ["EAPI"])[0]
+ eapi = mydbapi.aux_get(mycpv, ["EAPI"])[0]
if not eapi_is_supported(eapi):
# can't do anything with this.
raise portage_exception.UnsupportedAPIException(mycpv, eapi)
writemsg("!!! doebuild: "+str(myebuild)+" not found for "+str(mydo)+"\n")
return 1
- mystatus = doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, tree)
+ mystatus = doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, db[myroot][tree].dbapi)
if mystatus:
return mystatus