diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-08-31 07:13:54 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-08-31 07:13:54 +0000 |
commit | 85cdc08a1274a2953b0ee19d4d0b6f96caab0490 (patch) | |
tree | bae2677586b9cfe75f40fed916fa4fa9e31a7f6f | |
parent | d995371c4689a9d541f543ce4aa7f89c938394ec (diff) | |
download | portage-85cdc08a1274a2953b0ee19d4d0b6f96caab0490.tar.gz portage-85cdc08a1274a2953b0ee19d4d0b6f96caab0490.tar.bz2 portage-85cdc08a1274a2953b0ee19d4d0b6f96caab0490.zip |
Add a warning for emake -j1 calls which disable parallelization. Thanks to
Diego "Flameeyes" Pettenò for the suggestion.
svn path=/main/trunk/; revision=11480
-rw-r--r-- | pym/repoman/checks.py | 9 | ||||
-rw-r--r-- | pym/repoman/errors.py | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py index 4b002568f..f7d7ce79d 100644 --- a/pym/repoman/checks.py +++ b/pym/repoman/checks.py @@ -268,12 +268,19 @@ class IUseUndefined(LineCheck): if self._iuse_def is None: yield 'IUSE is not defined' +class EMakeParallelDisabled(LineCheck): + """Check for emake -j1 calls which disable parallelization.""" + repoman_check_name = 'ebuild.minorsyn' + re = re.compile(r'^\s*emake\s*-j\s*1\s') + error = errors.EMAKE_PARALLEL_DISABLED + _constant_checks = tuple((c() for c in ( EbuildHeader, EbuildWhitespace, EbuildQuote, EbuildAssignment, EbuildUselessDodoc, EbuildUselessCdS, EbuildNestedDie, EbuildPatches, EbuildQuotedA, - IUseUndefined, InheritAutotools))) + IUseUndefined, InheritAutotools, + EMakeParallelDisabled))) def run_checks(contents, pkg): checks = _constant_checks diff --git a/pym/repoman/errors.py b/pym/repoman/errors.py index 90fa83820..c6577f945 100644 --- a/pym/repoman/errors.py +++ b/pym/repoman/errors.py @@ -13,3 +13,4 @@ MISSING_QUOTES_ERROR = 'Unquoted Variable on line: %d' 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' |