summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Stubbs <jstubbs@gentoo.org>2005-10-05 16:58:09 +0000
committerJason Stubbs <jstubbs@gentoo.org>2005-10-05 16:58:09 +0000
commitdc329ac5e0830ff55d57e4f2ed91e4ca0874ed6a (patch)
treed4e9cf634cf663aab41ca8600608940f2b4063f3 /pym/portage.py
parentExclude distcc and and ccache setup from the "setup" phase. Also make the red... (diff)
downloadportage-multirepo-dc329ac5e0830ff55d57e4f2ed91e4ca0874ed6a.tar.gz
portage-multirepo-dc329ac5e0830ff55d57e4f2ed91e4ca0874ed6a.tar.bz2
portage-multirepo-dc329ac5e0830ff55d57e4f2ed91e4ca0874ed6a.zip
Account for empty EAPI
svn path=/main/branches/2.0/; revision=2102
Diffstat (limited to 'pym/portage.py')
-rw-r--r--pym/portage.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 00ef4000..d8a1026c 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -5344,7 +5344,8 @@ class portdbapi(dbapi):
if doregen and mylocation==self.mysettings["PORTDIR"] and metacachedir and self.metadb[cat].has_key(pkg):
metadata=self.metadb[cat][pkg]
- metadata["EAPI"] = metadata.get("EAPI", "0").strip()
+ if "EAPI" not in metadata or not metadata["EAPI"].strip():
+ metadata["EAPI"] = "0"
if not eapi_is_supported(metadata["EAPI"]):
# intentionally wipe keys.
@@ -5426,7 +5427,8 @@ class portdbapi(dbapi):
mylines[x] = mylines[x][:-1]
mydata[auxdbkeys[x]] = mylines[x]
- mydata["EAPI"] = mydata.get("EAPI", "0").strip()
+ if "EAPI" not in mydata or not mydata["EAPI"].strip():
+ mydata["EAPI"] = "0"
if not eapi_is_supported(mydata["EAPI"]):
# if newer version, wipe everything and negate eapi