summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/EbuildMetadataPhase.py6
-rw-r--r--pym/portage/dbapi/porttree.py2
2 files changed, 5 insertions, 3 deletions
diff --git a/pym/_emerge/EbuildMetadataPhase.py b/pym/_emerge/EbuildMetadataPhase.py
index 2fbd29eb7..06cabe7d1 100644
--- a/pym/_emerge/EbuildMetadataPhase.py
+++ b/pym/_emerge/EbuildMetadataPhase.py
@@ -20,7 +20,7 @@ class EbuildMetadataPhase(SubProcess):
used to extract metadata from the ebuild.
"""
- __slots__ = ("cpv", "ebuild_hash", "fd_pipes", "metadata_callback",
+ __slots__ = ("cpv", "eapi", "ebuild_hash", "fd_pipes", "metadata_callback",
"metadata", "portdb", "repo_path", "settings") + \
("_raw_metadata",)
@@ -33,7 +33,9 @@ class EbuildMetadataPhase(SubProcess):
settings.setcpv(self.cpv)
ebuild_path = self.ebuild_hash.location
- eapi = None
+ # the caller can pass in eapi in order to avoid
+ # redundant _parse_eapi_ebuild_head calls
+ eapi = self.eapi
if eapi is None and \
'parse-eapi-ebuild-head' in settings.features:
eapi = portage._parse_eapi_ebuild_head(
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index 13c27e979..0ade59a19 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -528,7 +528,7 @@ class portdbapi(dbapi):
mydata = self._metadata_callback(
mycpv, mylocation, {'EAPI':eapi}, ebuild_hash)
else:
- proc = EbuildMetadataPhase(cpv=mycpv,
+ proc = EbuildMetadataPhase(cpv=mycpv, eapi=eapi,
ebuild_hash=ebuild_hash,
metadata_callback=self._metadata_callback, portdb=self,
repo_path=mylocation,