summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-21 04:30:29 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-21 04:30:29 -0700
commit860167c12d29701b6eccc68854fb39ef1d4ad016 (patch)
treead69f65da86090936be45daa1e752713378d3f3c
parent3ada2a89635c576028309aa2606b00304875eb83 (diff)
downloadportage-860167c12d29701b6eccc68854fb39ef1d4ad016.tar.gz
portage-860167c12d29701b6eccc68854fb39ef1d4ad016.tar.bz2
portage-860167c12d29701b6eccc68854fb39ef1d4ad016.zip
Add upstream.workaround warning for addpredict calls. Thanks to
Diego Pettenò <flameeyes@g.o> for the suggestion.
-rw-r--r--pym/repoman/checks.py8
-rw-r--r--pym/repoman/errors.py3
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'