summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-10-04 01:52:20 +0000
committerZac Medico <zmedico@gentoo.org>2007-10-04 01:52:20 +0000
commit2edd4aaab3c34e9be9af753a45205235f645000b (patch)
tree352db012214f48adfe39c18048a67590d2ef28d8
parent5f18c8bfc0441728574b9de87e220ec45b4e3a48 (diff)
downloadportage-2edd4aaab3c34e9be9af753a45205235f645000b.tar.gz
portage-2edd4aaab3c34e9be9af753a45205235f645000b.tar.bz2
portage-2edd4aaab3c34e9be9af753a45205235f645000b.zip
Bump EAPI from 0 to 1 and fix eapi_is_supported() so that
it works properly with both 0 and 1. svn path=/main/trunk/; revision=7909
-rw-r--r--pym/portage/__init__.py8
-rw-r--r--pym/portage/const.py2
2 files changed, 8 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 8ffe9c275..3f180288d 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -3319,7 +3319,13 @@ def spawnebuild(mydo,actionmap,mysettings,debug,alwaysdep=0,logfile=None):
def eapi_is_supported(eapi):
- return str(eapi).strip() == str(portage.const.EAPI).strip()
+ try:
+ eapi = int(str(eapi).strip())
+ except ValueError:
+ eapi = -1
+ if eapi < 0:
+ return False
+ return eapi <= portage.const.EAPI
def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, mydbapi):
diff --git a/pym/portage/const.py b/pym/portage/const.py
index d8bd604d1..90447540b 100644
--- a/pym/portage/const.py
+++ b/pym/portage/const.py
@@ -56,7 +56,7 @@ INCREMENTALS = ["USE", "USE_EXPAND", "USE_EXPAND_HIDDEN", "FEATURES",
EBUILD_PHASES = ["setup", "unpack", "compile", "test", "install",
"preinst", "postinst", "prerm", "postrm", "other"]
-EAPI = 0
+EAPI = 1
HASHING_BLOCKSIZE = 32768
MANIFEST1_HASH_FUNCTIONS = ["MD5","SHA256","RMD160"]