1 |
Author: zmedico |
2 |
Date: 2008-08-31 07:13:54 +0000 (Sun, 31 Aug 2008) |
3 |
New Revision: 11480 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/repoman/checks.py |
7 |
main/trunk/pym/repoman/errors.py |
8 |
Log: |
9 |
Add a warning for emake -j1 calls which disable parallelization. Thanks to |
10 |
Diego "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-30 21:43:52 UTC (rev 11479) |
16 |
+++ main/trunk/pym/repoman/checks.py 2008-08-31 07:13:54 UTC (rev 11480) |
17 |
@@ -268,12 +268,19 @@ |
18 |
if self._iuse_def is None: |
19 |
yield 'IUSE is not defined' |
20 |
|
21 |
+class EMakeParallelDisabled(LineCheck): |
22 |
+ """Check for emake -j1 calls which disable parallelization.""" |
23 |
+ repoman_check_name = 'ebuild.minorsyn' |
24 |
+ re = re.compile(r'^\s*emake\s*-j\s*1\s') |
25 |
+ error = errors.EMAKE_PARALLEL_DISABLED |
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 |
+ IUseUndefined, InheritAutotools, |
34 |
+ EMakeParallelDisabled))) |
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-30 21:43:52 UTC (rev 11479) |
42 |
+++ main/trunk/pym/repoman/errors.py 2008-08-31 07:13:54 UTC (rev 11480) |
43 |
@@ -13,3 +13,4 @@ |
44 |
NESTED_DIE_ERROR = 'Ebuild calls die in a subshell on line: %d' |
45 |
PATCHES_ERROR = 'PATCHES is not a bash array on line: %d' |
46 |
REDUNDANT_CD_S_ERROR = 'Ebuild has redundant cd ${S} statement on line: %d' |
47 |
+EMAKE_PARALLEL_DISABLED = 'Ebuild calls emake -j1 on line: %d' |