summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-10-04 02:19:03 +0000
committerZac Medico <zmedico@gentoo.org>2007-10-04 02:19:03 +0000
commit436c79cb80b82eb855d7d9415aa5c1c3d74dda32 (patch)
tree9687118be4423bd15204adc6f019e4fe36412a93
parent2edd4aaab3c34e9be9af753a45205235f645000b (diff)
downloadportage-436c79cb80b82eb855d7d9415aa5c1c3d74dda32.tar.gz
portage-436c79cb80b82eb855d7d9415aa5c1c3d74dda32.tar.bz2
portage-436c79cb80b82eb855d7d9415aa5c1c3d74dda32.zip
When the metadata cache contains a negative EAPI, it means
that the cache entry was generated by a version of portage that did not support the eapi. When the user upgrades to a version that now supports the previously unsupported EAPI, those cache entries need to be regenerated. Therefore, when a cache entry has a negative EAPI, check if the EAPI would be supported and trigger a regen if appropriate. svn path=/main/trunk/; revision=7910
-rw-r--r--pym/portage/dbapi/porttree.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index dc54efe5c..71b2a2a2c 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -282,7 +282,13 @@ class portdbapi(dbapi):
try:
mydata = self.auxdb[mylocation][mycpv]
- if emtime != long(mydata.get("_mtime_", 0)):
+ try:
+ eapi = int(mydata.get("EAPI", 0))
+ except ValueError:
+ raise KeyError()
+ if eapi < 0 and eapi_is_supported(-eapi):
+ doregen = True
+ elif emtime != long(mydata.get("_mtime_", 0)):
doregen = True
elif len(mydata.get("_eclasses_", [])) > 0:
doregen = not self.eclassdb.is_eclass_data_valid(mydata["_eclasses_"])