summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-10-04 02:33:53 +0000
committerZac Medico <zmedico@gentoo.org>2007-10-04 02:33:53 +0000
commit64ac544bc2077d17866a53b0acbc8babf462cbcf (patch)
tree905a498b5131be447504cfe7cda076b331ba6634
parent436c79cb80b82eb855d7d9415aa5c1c3d74dda32 (diff)
downloadportage-64ac544bc2077d17866a53b0acbc8babf462cbcf.tar.gz
portage-64ac544bc2077d17866a53b0acbc8babf462cbcf.tar.bz2
portage-64ac544bc2077d17866a53b0acbc8babf462cbcf.zip
Non-integer EAPI isn't supported. In case it's supported in
the future, assume that it's valid (rather than trigger a regen). svn path=/main/trunk/; revision=7911
-rw-r--r--pym/portage/dbapi/porttree.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index 71b2a2a2c..83c568fa0 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -282,11 +282,17 @@ class portdbapi(dbapi):
try:
mydata = self.auxdb[mylocation][mycpv]
+ eapi = mydata.get("EAPI","").strip()
+ if not eapi:
+ eapi = 0
try:
- eapi = int(mydata.get("EAPI", 0))
+ eapi = int(eapi)
except ValueError:
- raise KeyError()
- if eapi < 0 and eapi_is_supported(-eapi):
+ # Non-integer EAPI isn't supported. In case it's supported in
+ # the future, assume that it's valid (rather than trigger a
+ # regen).
+ eapi = None
+ if eapi is not None and eapi < 0 and eapi_is_supported(-eapi):
doregen = True
elif emtime != long(mydata.get("_mtime_", 0)):
doregen = True