From a6de04e2e0daa4c2697ecb9d11f6adaf8bbf63f2 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 10 Dec 2009 01:02:01 +0000 Subject: Bump EAPI conditionals to account for rename of EAPI 3 to 4. Thanks to Jonathan Callen for this patch. (trunk r14965) svn path=/main/branches/2.1.7/; revision=14999 --- pym/portage/__init__.py | 8 ++++---- pym/repoman/checks.py | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'pym') diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 90d82486e..333a24294 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -3748,7 +3748,7 @@ class config(object): mydict["USE"] = self.get("PORTAGE_USE", "") # Don't export AA to the ebuild environment in EAPIs that forbid it - if eapi not in ("0", "1", "2"): + if eapi not in ("0", "1", "2", "3"): mydict.pop("AA", None) # sandbox's bashrc sources /etc/profile which unsets ROOTPATH, @@ -5613,7 +5613,7 @@ def spawnebuild(mydo, actionmap, mysettings, debug, alwaysdep=0, if mydo == "prepare" and eapi in ("0", "1"): return os.EX_OK - if mydo == "pretend" and eapi in ("0", "1", "2"): + if mydo == "pretend" and eapi in ("0", "1", "2", "3"): return os.EX_OK kwargs = actionmap[mydo]["args"] @@ -6042,7 +6042,7 @@ def _spawn_misc_sh(mysettings, commands, phase=None, **kwargs): return rval _testing_eapis = frozenset() -_deprecated_eapis = frozenset(["2_pre3", "2_pre2", "2_pre1"]) +_deprecated_eapis = frozenset(["3_pre1", "2_pre3", "2_pre2", "2_pre1"]) def _eapi_is_deprecated(eapi): return eapi in _deprecated_eapis @@ -6261,7 +6261,7 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, m mysettings["PORTAGE_BUILDDIR"], ".exit_status") #set up KV variable -- DEP SPEEDUP :: Don't waste time. Keep var persistent. - if eapi not in ('0', '1', '2'): + if eapi not in ('0', '1', '2', '3'): # Discard KV for EAPIs that don't support it. Cache KV is restored # from the backupenv whenever config.reset() is called. mysettings.pop('KV', None) diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py index a754ad46e..ce72e36ea 100644 --- a/pym/repoman/checks.py +++ b/pym/repoman/checks.py @@ -426,8 +426,8 @@ class SrcUnpackPatches(PhaseCheck): return ("'%s'" % m.group(1)) + \ " call should be moved to src_prepare from line: %d" -# EAPI-3 checks -class Eapi3IncompatibleFuncs(LineCheck): +# EAPI-4 checks +class Eapi4IncompatibleFuncs(LineCheck): repoman_check_name = 'EAPI.incompatible' ignore_line = re.compile(r'(^\s*#)') banned_commands_re = re.compile(r'^\s*(dosed|dohard)') @@ -436,15 +436,15 @@ class Eapi3IncompatibleFuncs(LineCheck): self.eapi = pkg.metadata['EAPI'] def check_eapi(self, eapi): - return self.eapi not in ('0', '1', '2') + return self.eapi not in ('0', '1', '2', '3') def check(self, num, line): m = self.banned_commands_re.match(line) if m is not None: return ("'%s'" % m.group(1)) + \ - " has been banned in EAPI=3 on line: %d" + " has been banned in EAPI=4 on line: %d" -class Eapi3GoneVars(LineCheck): +class Eapi4GoneVars(LineCheck): repoman_check_name = 'EAPI.incompatible' ignore_line = re.compile(r'(^\s*#)') undefined_vars_re = re.compile(r'.*\$(\{(AA|KV)\}|(AA|KV))') @@ -453,13 +453,13 @@ class Eapi3GoneVars(LineCheck): self.eapi = pkg.metadata['EAPI'] def check_eapi(self, eapi): - return self.eapi not in ('0', '1', '2') + return self.eapi not in ('0', '1', '2', '3') def check(self, num, line): m = self.undefined_vars_re.match(line) if m is not None: return ("variable '$%s'" % m.group(1)) + \ - " is gone in EAPI=3 on line: %d" + " is gone in EAPI=4 on line: %d" _constant_checks = tuple((c() for c in ( @@ -470,7 +470,7 @@ _constant_checks = tuple((c() for c in ( IUseUndefined, InheritAutotools, EMakeParallelDisabled, EMakeParallelDisabledViaMAKEOPTS, DeprecatedBindnowFlags, SrcUnpackPatches, WantAutoDefaultValue, - SrcCompileEconf, Eapi3IncompatibleFuncs, Eapi3GoneVars))) + SrcCompileEconf, Eapi4IncompatibleFuncs, Eapi4GoneVars))) _here_doc_re = re.compile(r'.*\s<<[-]?(\w+)$') -- cgit v1.2.3-1-g7c22