Bump EAPI from 0 to 1 and fix eapi_is_supported() so that
authorZac Medico <zmedico@gentoo.org>
Thu, 4 Oct 2007 01:52:20 +0000 (01:52 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 4 Oct 2007 01:52:20 +0000 (01:52 -0000)
it works properly with both 0 and 1.

svn path=/main/trunk/; revision=7909

pym/portage/__init__.py
pym/portage/const.py

index 8ffe9c27538398faf13deed308494868b8419a45..3f180288d9fb6696e12659222311530a9d162dac 100644 (file)
@@ -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):
 
index d8bd604d17c3a2e8c7df944ac8727b9ed255262b..90447540b2d16cd9f174d545348f122622ce38bb 100644 (file)
@@ -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"]