summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-08-31 08:05:50 +0000
committerZac Medico <zmedico@gentoo.org>2008-08-31 08:05:50 +0000
commitd26b4a4112854bbbfbd6d5f9edc6e6d0454bb1de (patch)
tree1358f04af3fd3c3af5d17ba4d77d746cdd88e9b6
parent85cdc08a1274a2953b0ee19d4d0b6f96caab0490 (diff)
downloadportage-d26b4a4112854bbbfbd6d5f9edc6e6d0454bb1de.tar.gz
portage-d26b4a4112854bbbfbd6d5f9edc6e6d0454bb1de.tar.bz2
portage-d26b4a4112854bbbfbd6d5f9edc6e6d0454bb1de.zip
Check for calls to the deprecated bindnow-flags function. Thanks to Diego
"Flameeyes" Pettenò for the suggestion. svn path=/main/trunk/; revision=11481
-rw-r--r--pym/repoman/checks.py8
-rw-r--r--pym/repoman/errors.py1
2 files changed, 8 insertions, 1 deletions
diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py
index f7d7ce79d..e5237237f 100644
--- a/pym/repoman/checks.py
+++ b/pym/repoman/checks.py
@@ -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
diff --git a/pym/repoman/errors.py b/pym/repoman/errors.py
index c6577f945..7c54cc13d 100644
--- a/pym/repoman/errors.py
+++ b/pym/repoman/errors.py
@@ -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'