diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-05-10 14:23:56 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-05-10 16:32:39 -0700 |
commit | b6ef0aedb1b1b7c6fd4ab2d8d38369724ec6c383 (patch) | |
tree | 2e23d93199a4310c841ebbb0b4b826eb795822aa /bin | |
parent | 933ab0862f7333f0a4d1cc7ac85dea9f2693097c (diff) | |
download | portage-b6ef0aedb1b1b7c6fd4ab2d8d38369724ec6c383.tar.gz portage-b6ef0aedb1b1b7c6fd4ab2d8d38369724ec6c383.tar.bz2 portage-b6ef0aedb1b1b7c6fd4ab2d8d38369724ec6c383.zip |
Don't write or trust cache for unsupported EAPIs.
Since we're supposed to be able to efficiently obtain the EAPI from
_parse_eapi_ebuild_head, we don't need to write or trust cache entries
for unsupported EAPIs.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/egencache | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/egencache b/bin/egencache index b301115f2..13860bca0 100755 --- a/bin/egencache +++ b/bin/egencache @@ -238,10 +238,15 @@ class GenCache(object): self._existing_nodes = set() - def _metadata_callback(self, cpv, repo_path, metadata, ebuild_hash): + def _metadata_callback(self, cpv, repo_path, metadata, + ebuild_hash, eapi_supported): self._existing_nodes.add(cpv) self._cp_missing.discard(cpv_getkey(cpv)) - if metadata is not None: + + # Since we're supposed to be able to efficiently obtain the + # EAPI from _parse_eapi_ebuild_head, we don't write cache + # entries for unsupported EAPIs. + if metadata is not None and eapi_supported: if metadata.get('EAPI') == '0': del metadata['EAPI'] for trg_cache in self._trg_caches: |