Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r12333 - main/branches/2.1.6/pym/portage/cache
Date: Thu, 25 Dec 2008 05:04:28
Message-Id: E1LFiOO-0007Ba-DN@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-12-25 05:04:15 +0000 (Thu, 25 Dec 2008)
3 New Revision: 12333
4
5 Modified:
6 main/branches/2.1.6/pym/portage/cache/util.py
7 Log:
8 Inside mirror_cache(), handle unsupported EAPI like portdbapi does.
9 (trunk r12327)
10
11 Modified: main/branches/2.1.6/pym/portage/cache/util.py
12 ===================================================================
13 --- main/branches/2.1.6/pym/portage/cache/util.py 2008-12-25 04:52:59 UTC (rev 12332)
14 +++ main/branches/2.1.6/pym/portage/cache/util.py 2008-12-25 05:04:15 UTC (rev 12333)
15 @@ -10,6 +10,7 @@
16
17 def mirror_cache(valid_nodes_iterable, src_cache, trg_cache, eclass_cache=None, verbose_instance=None):
18
19 + from portage import eapi_is_supported
20 if not src_cache.complete_eclass_entries and not eclass_cache:
21 raise Exception("eclass_cache required for cache's of class %s!" % src_cache.__class__)
22
23 @@ -96,6 +97,14 @@
24 continue
25 entry["_eclasses_"] = eclasses
26
27 + eapi = entry.get("EAPI")
28 + if not eapi:
29 + eapi = "0"
30 + if not eapi_is_supported(eapi):
31 + for k in set(entry).difference(("_mtime_", "_eclasses_")):
32 + entry[k] = ""
33 + entry["EAPI"] = "-" + eapi
34 +
35 # by this time, if it reaches here, the eclass has been validated, and the entry has
36 # been updated/translated (if needs be, for metadata/cache mainly)
37 try: trg_cache[x] = entry