When the metadata cache contains a negative EAPI, it means
authorZac Medico <zmedico@gentoo.org>
Fri, 5 Oct 2007 02:50:59 +0000 (02:50 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 5 Oct 2007 02:50:59 +0000 (02:50 -0000)
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.
(trunk r7910 and r7919)

svn path=/main/branches/2.1.2/; revision=7933

pym/portage.py

index eafefbe6bde00ee0e4140dc2dd6e149cc38b616e..dca191dcd98da268b8a3dd8107789fa826f1d76a 100644 (file)
@@ -6263,7 +6263,12 @@ class portdbapi(dbapi):
 
                try:
                        mydata = self.auxdb[mylocation][mycpv]
-                       if emtime != long(mydata.get("_mtime_", 0)):
+                       eapi = mydata.get("EAPI","").strip()
+                       if not eapi:
+                               eapi = "0"
+                       if eapi.startswith("-") and eapi_is_supported(eapi[1:]):
+                               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_"])