summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/dbapi/porttree.py25
1 files changed, 17 insertions, 8 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index b0cd5f49a..1db15da51 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -35,6 +35,8 @@ from portage import _encodings
from portage import _unicode_decode
from portage import _unicode_encode
from portage import OrderedDict
+from _emerge.EbuildMetadataPhase import EbuildMetadataPhase
+from _emerge.TaskScheduler import TaskScheduler
import os as _os
import codecs
@@ -524,8 +526,7 @@ class portdbapi(dbapi):
if metadata is not None:
return None
- import _emerge
- process = _emerge.EbuildMetadataPhase(cpv=cpv, ebuild_path=ebuild_path,
+ process = EbuildMetadataPhase(cpv=cpv, ebuild_path=ebuild_path,
ebuild_mtime=emtime, metadata_callback=self._metadata_callback,
portdb=self, repo_path=repo_path, settings=self.doebuild_settings)
return process
@@ -664,16 +665,24 @@ class portdbapi(dbapi):
if eapi is not None and not portage.eapi_is_supported(eapi):
mydata['EAPI'] = eapi
+ self._metadata_callback(
+ mycpv, myebuild, mylocation, mydata, emtime)
else:
- myret = doebuild(myebuild, "depend",
- self.doebuild_settings["ROOT"], self.doebuild_settings,
- dbkey=mydata, tree="porttree", mydbapi=self)
- if myret != os.EX_OK:
+ sched = TaskScheduler()
+ proc = EbuildMetadataPhase(cpv=mycpv, ebuild_path=myebuild,
+ ebuild_mtime=emtime,
+ metadata_callback=self._metadata_callback, portdb=self,
+ repo_path=mylocation, scheduler=sched.sched_iface,
+ settings=self.doebuild_settings)
+
+ sched.add(proc)
+ sched.run()
+
+ if proc.returncode != os.EX_OK:
self._broken_ebuilds.add(myebuild)
raise KeyError(mycpv)
- self._metadata_callback(
- mycpv, myebuild, mylocation, mydata, emtime)
+ mydata.update(proc.metadata)
if mydata.get("INHERITED", False):
mydata["_eclasses_"] = self._repo_info[mylocation