Check for calls to the deprecated bindnow-flags function. Thanks to Diego
authorZac Medico <zmedico@gentoo.org>
Sun, 31 Aug 2008 08:05:50 +0000 (08:05 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 31 Aug 2008 08:05:50 +0000 (08:05 -0000)
"Flameeyes" Pettenò for the suggestion.

svn path=/main/trunk/; revision=11481

pym/repoman/checks.py
pym/repoman/errors.py

index f7d7ce79d66e48914d332dfc01ff2b609b1181f2..e5237237f513a4fc982992b17b3e4547d8f1dd8c 100644 (file)
@@ -274,13 +274,19 @@ class EMakeParallelDisabled(LineCheck):
        re = re.compile(r'^\s*emake\s*-j\s*1\s')
        error = errors.EMAKE_PARALLEL_DISABLED
 
+class DeprecatedBindnowFlags(LineCheck):
+       """Check for calls to the deprecated bindnow-flags function."""
+       repoman_check_name = 'ebuild.minorsyn'
+       re = re.compile(r'.*\$\(bindnow-flags\)')
+       error = errors.DEPRECATED_BINDNOW_FLAGS
+
 _constant_checks = tuple((c() for c in (
        EbuildHeader, EbuildWhitespace, EbuildQuote,
        EbuildAssignment, EbuildUselessDodoc,
        EbuildUselessCdS, EbuildNestedDie,
        EbuildPatches, EbuildQuotedA,
        IUseUndefined, InheritAutotools,
-       EMakeParallelDisabled)))
+       EMakeParallelDisabled, DeprecatedBindnowFlags)))
 
 def run_checks(contents, pkg):
        checks = _constant_checks
index c6577f945c3bb88670004eb000b074b521fd9ffa..7c54cc13d9982c013cc9130932c58cbe2dab27a8 100644 (file)
@@ -14,3 +14,4 @@ NESTED_DIE_ERROR = 'Ebuild calls die in a subshell on line: %d'
 PATCHES_ERROR = 'PATCHES is not a bash array on line: %d'
 REDUNDANT_CD_S_ERROR = 'Ebuild has redundant cd ${S} statement on line: %d'
 EMAKE_PARALLEL_DISABLED = 'Ebuild calls emake -j1 on line: %d'
+DEPRECATED_BINDNOW_FLAGS = 'Deprecated bindnow-flags call on line: %d'