1 |
Author: zmedico |
2 |
Date: 2008-08-31 08:05:50 +0000 (Sun, 31 Aug 2008) |
3 |
New Revision: 11481 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/repoman/checks.py |
7 |
main/trunk/pym/repoman/errors.py |
8 |
Log: |
9 |
Check for calls to the deprecated bindnow-flags function. Thanks to Diego |
10 |
"Flameeyes" Petten?\195?\178 for the suggestion. |
11 |
|
12 |
|
13 |
Modified: main/trunk/pym/repoman/checks.py |
14 |
=================================================================== |
15 |
--- main/trunk/pym/repoman/checks.py 2008-08-31 07:13:54 UTC (rev 11480) |
16 |
+++ main/trunk/pym/repoman/checks.py 2008-08-31 08:05:50 UTC (rev 11481) |
17 |
@@ -274,13 +274,19 @@ |
18 |
re = re.compile(r'^\s*emake\s*-j\s*1\s') |
19 |
error = errors.EMAKE_PARALLEL_DISABLED |
20 |
|
21 |
+class DeprecatedBindnowFlags(LineCheck): |
22 |
+ """Check for calls to the deprecated bindnow-flags function.""" |
23 |
+ repoman_check_name = 'ebuild.minorsyn' |
24 |
+ re = re.compile(r'.*\$\(bindnow-flags\)') |
25 |
+ error = errors.DEPRECATED_BINDNOW_FLAGS |
26 |
+ |
27 |
_constant_checks = tuple((c() for c in ( |
28 |
EbuildHeader, EbuildWhitespace, EbuildQuote, |
29 |
EbuildAssignment, EbuildUselessDodoc, |
30 |
EbuildUselessCdS, EbuildNestedDie, |
31 |
EbuildPatches, EbuildQuotedA, |
32 |
IUseUndefined, InheritAutotools, |
33 |
- EMakeParallelDisabled))) |
34 |
+ EMakeParallelDisabled, DeprecatedBindnowFlags))) |
35 |
|
36 |
def run_checks(contents, pkg): |
37 |
checks = _constant_checks |
38 |
|
39 |
Modified: main/trunk/pym/repoman/errors.py |
40 |
=================================================================== |
41 |
--- main/trunk/pym/repoman/errors.py 2008-08-31 07:13:54 UTC (rev 11480) |
42 |
+++ main/trunk/pym/repoman/errors.py 2008-08-31 08:05:50 UTC (rev 11481) |
43 |
@@ -14,3 +14,4 @@ |
44 |
PATCHES_ERROR = 'PATCHES is not a bash array on line: %d' |
45 |
REDUNDANT_CD_S_ERROR = 'Ebuild has redundant cd ${S} statement on line: %d' |
46 |
EMAKE_PARALLEL_DISABLED = 'Ebuild calls emake -j1 on line: %d' |
47 |
+DEPRECATED_BINDNOW_FLAGS = 'Deprecated bindnow-flags call on line: %d' |