From 860167c12d29701b6eccc68854fb39ef1d4ad016 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 21 Aug 2010 04:30:29 -0700 Subject: =?UTF-8?q?Add=20upstream.workaround=20warning=20for=20addpredict?= =?UTF-8?q?=20calls.=20Thanks=20to=20Diego=20Petten=C3=B2=20=20for=20the=20suggestion.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/repoman/checks.py | 8 +++++++- pym/repoman/errors.py | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) 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' -- cgit v1.2.3-1-g7c22