From: Zac Medico Date: Sat, 21 Aug 2010 11:30:29 +0000 (-0700) Subject: Add upstream.workaround warning for addpredict calls. Thanks to X-Git-Tag: v2.2_rc68~41 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=860167c12d29701b6eccc68854fb39ef1d4ad016;p=portage.git Add upstream.workaround warning for addpredict calls. Thanks to Diego Pettenò for the suggestion. --- diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py index 07f1deade..ed3079574 100644 --- a/pym/repoman/checks.py +++ b/pym/repoman/checks.py @@ -448,6 +448,12 @@ class PreserveOldLib(LineCheck): re = re.compile(r'.*preserve_old_lib') error = errors.PRESERVE_OLD_LIB +class SandboxAddpredict(LineCheck): + """Check for calls to the addpredict function.""" + repoman_check_name = 'upstream.workaround' + re = re.compile(r'(^|\s)addpredict\b') + error = errors.SANDBOX_ADDPREDICT + class DeprecatedBindnowFlags(LineCheck): """Check for calls to the deprecated bindnow-flags function.""" repoman_check_name = 'ebuild.minorsyn' @@ -553,7 +559,7 @@ _constant_checks = tuple((c() for c in ( DeprecatedBindnowFlags, SrcUnpackPatches, WantAutoDefaultValue, SrcCompileEconf, Eapi3DeprecatedFuncs, Eapi4IncompatibleFuncs, Eapi4GoneVars, BuiltWithUse, - PreserveOldLib))) + PreserveOldLib, SandboxAddpredict))) _here_doc_re = re.compile(r'.*\s<<[-]?(\w+)$') diff --git a/pym/repoman/errors.py b/pym/repoman/errors.py index 8a28d4fd7..5ad6be31f 100644 --- a/pym/repoman/errors.py +++ b/pym/repoman/errors.py @@ -1,5 +1,5 @@ # repoman: Error Messages -# Copyright 2007 Gentoo Foundation +# Copyright 2007-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 COPYRIGHT_ERROR = 'Invalid Gentoo Copyright on line: %d' @@ -20,3 +20,4 @@ NO_AS_NEEDED = 'Upstream asneeded linking bug (no-as-needed on line: %d)' PRESERVE_OLD_LIB = 'Upstream ABI change workaround on line: %d' BUILT_WITH_USE = 'built_with_use on line: %d' EPREFIXIFY_MISSING_INHERIT = "prefix.eclass is not inherited, but eprefixify is used on line: %d" +SANDBOX_ADDPREDICT = 'Ebuild calls addpredict on line: %d'