From c88960470151c8737595b838acefdedc8be2ac2a Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 5 Oct 2007 02:46:25 +0000 Subject: [PATCH] Bump EAPI from 0 to 1 and fix eapi_is_supported() so that it works properly with both 0 and 1. (trunk r7909) svn path=/main/branches/2.1.2/; revision=7932 --- pym/portage.py | 8 +++++++- pym/portage_const.py | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pym/portage.py b/pym/portage.py index b74f4d2c8..eafefbe6b 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -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): diff --git a/pym/portage_const.py b/pym/portage_const.py index 8eea0faba..f29e7b6b7 100644 --- a/pym/portage_const.py +++ b/pym/portage_const.py @@ -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"] -- 2.26.2