summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/EbuildMetadataPhase.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-10-16 13:26:46 -0700
committerZac Medico <zmedico@gentoo.org>2011-10-16 13:26:46 -0700
commit1272f5c55baa5c6d68d5ab3a1dceef69cc47e69b (patch)
tree7fb19f7148ede0ac46574d3477b68f61edd0e648 /pym/_emerge/EbuildMetadataPhase.py
parent508d5dfbf8e9e0919e3889a6b81e1dfe1b43ee43 (diff)
downloadportage-1272f5c55baa5c6d68d5ab3a1dceef69cc47e69b.tar.gz
portage-1272f5c55baa5c6d68d5ab3a1dceef69cc47e69b.tar.bz2
portage-1272f5c55baa5c6d68d5ab3a1dceef69cc47e69b.zip
EbuildMetadataPhase: avoid redundant EAPI parsing
Diffstat (limited to 'pym/_emerge/EbuildMetadataPhase.py')
-rw-r--r--pym/_emerge/EbuildMetadataPhase.py6
1 files changed, 4 insertions, 2 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(