From 2edd4aaab3c34e9be9af753a45205235f645000b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 4 Oct 2007 01:52:20 +0000 Subject: 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 --- pym/portage/__init__.py | 8 +++++++- pym/portage/const.py | 2 +- 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"] -- cgit v1.2.3-1-g7c22