summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-12-25 05:04:15 +0000
committerZac Medico <zmedico@gentoo.org>2008-12-25 05:04:15 +0000
commit4b1fa9b8f974a8964164ab754582c88eb93c93cc (patch)
treeb0a979d31db8bdd5883dae9d041249acea2e1ed9
parent077a0152355dce830cc9d2c04fd2533f6550460a (diff)
downloadportage-4b1fa9b8f974a8964164ab754582c88eb93c93cc.tar.gz
portage-4b1fa9b8f974a8964164ab754582c88eb93c93cc.tar.bz2
portage-4b1fa9b8f974a8964164ab754582c88eb93c93cc.zip
Inside mirror_cache(), handle unsupported EAPI like portdbapi does.
(trunk r12327) svn path=/main/branches/2.1.6/; revision=12333
-rw-r--r--pym/portage/cache/util.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/pym/portage/cache/util.py b/pym/portage/cache/util.py
index dc3881b19..7e8310014 100644
--- a/pym/portage/cache/util.py
+++ b/pym/portage/cache/util.py
@@ -10,6 +10,7 @@ from portage.cache import cache_errors
def mirror_cache(valid_nodes_iterable, src_cache, trg_cache, eclass_cache=None, verbose_instance=None):
+ from portage import eapi_is_supported
if not src_cache.complete_eclass_entries and not eclass_cache:
raise Exception("eclass_cache required for cache's of class %s!" % src_cache.__class__)
@@ -96,6 +97,14 @@ def mirror_cache(valid_nodes_iterable, src_cache, trg_cache, eclass_cache=None,
continue
entry["_eclasses_"] = eclasses
+ eapi = entry.get("EAPI")
+ if not eapi:
+ eapi = "0"
+ if not eapi_is_supported(eapi):
+ for k in set(entry).difference(("_mtime_", "_eclasses_")):
+ entry[k] = ""
+ entry["EAPI"] = "-" + eapi
+
# by this time, if it reaches here, the eclass has been validated, and the entry has
# been updated/translated (if needs be, for metadata/cache mainly)
try: trg_cache[x] = entry