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",)
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(
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,