From: Zac Medico Date: Thu, 4 Oct 2007 02:19:03 +0000 (-0000) Subject: When the metadata cache contains a negative EAPI, it means X-Git-Tag: v2.2_pre1~735 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=436c79cb80b82eb855d7d9415aa5c1c3d74dda32;p=portage.git 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 --- 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_"])