From 09cc5c655fcc34a13842ca6d296a32cbedb8b820 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 25 Dec 2008 02:29:45 +0000 Subject: Inside mirror_cache(), handle unsupported EAPI like portdbapi does. svn path=/main/trunk/; revision=12327 --- pym/portage/cache/util.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- cgit v1.2.3-1-g7c22