From b6ef0aedb1b1b7c6fd4ab2d8d38369724ec6c383 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 10 May 2012 14:23:56 -0700 Subject: 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. --- bin/egencache | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'bin') 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: -- cgit v1.2.3-1-g7c22