summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Harring <ferringb@gentoo.org>2005-10-05 17:11:50 +0000
committerBrian Harring <ferringb@gentoo.org>2005-10-05 17:11:50 +0000
commit07331df52b23e336a364699c6544f7c9dc76fb7a (patch)
tree506b9f1229687dbbe622fa3a1cab29dde78362ca
parentdc329ac5e0830ff55d57e4f2ed91e4ca0874ed6a (diff)
downloadportage-07331df52b23e336a364699c6544f7c9dc76fb7a.tar.gz
portage-07331df52b23e336a364699c6544f7c9dc76fb7a.tar.bz2
portage-07331df52b23e336a364699c6544f7c9dc76fb7a.zip
save _mtime_ when EAPI nukes a cache entry, and a tweak to the supported eapi check so it's lenient about spaces
svn path=/main/branches/2.0/; revision=2103
-rw-r--r--pym/portage.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/portage.py b/pym/portage.py
index d8a1026c0..f9db78856 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -2348,7 +2348,7 @@ actionmap_deps={
def eapi_is_supported(eapi):
- return str(eapi) == str(portage_const.EAPI)
+ return str(eapi).strip() == str(portage_const.EAPI).strip()
def doebuild(myebuild,mydo,myroot,mysettings,debug=0,listonly=0,fetchonly=0,cleanup=0,dbkey=None,use_cache=1,fetchall=0,tree="porttree"):
@@ -5344,14 +5344,16 @@ class portdbapi(dbapi):
if doregen and mylocation==self.mysettings["PORTDIR"] and metacachedir and self.metadb[cat].has_key(pkg):
metadata=self.metadb[cat][pkg]
- if "EAPI" not in metadata or not metadata["EAPI"].strip():
+ if not (metadata.has_key("EAPI") and metadata["EAPI"].strip()):
metadata["EAPI"] = "0"
if not eapi_is_supported(metadata["EAPI"]):
# intentionally wipe keys.
eapi = metadata["EAPI"]
+ mtime = metadata.get("_mtime_", 0)
metadata = {}
map(lambda x: metadata.setdefault(x, ''), auxdbkeys)
+ metadata["_mtime_"] = long(mtime)
metadata["EAPI"] == "-"+eapi
else: