Bump EAPI from 0 to 1 and fix eapi_is_supported() so that
authorZac Medico <zmedico@gentoo.org>
Fri, 5 Oct 2007 02:46:25 +0000 (02:46 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 5 Oct 2007 02:46:25 +0000 (02:46 -0000)
it works properly with both 0 and 1. (trunk r7909)

svn path=/main/branches/2.1.2/; revision=7932

pym/portage.py
pym/portage_const.py

index b74f4d2c86c3dd0f02345a2047784a89169a6a48..eafefbe6bde00ee0e4140dc2dd6e149cc38b616e 100644 (file)
@@ -3277,7 +3277,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 8eea0faba3a0f816a78140bc7a79926848ff02ab..f29e7b6b798533d7ad8fa22cfb3abbd3737f1ad3 100644 (file)
@@ -55,7 +55,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"]