summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-02-27 01:08:01 +0000
committerZac Medico <zmedico@gentoo.org>2009-02-27 01:08:01 +0000
commit2cce211ab599524b19495b5ed47ae945b11703e8 (patch)
tree01ea478a28699197b7bba25ff482433fa87d2b99 /pym
parent3bafa92366dc85bb139048e621aaa51001bec03b (diff)
downloadportage-2cce211ab599524b19495b5ed47ae945b11703e8.tar.gz
portage-2cce211ab599524b19495b5ed47ae945b11703e8.tar.bz2
portage-2cce211ab599524b19495b5ed47ae945b11703e8.zip
Add a new upstream.workaround check for hardcoded MAKEOPTS=-j1 (previously
only emake -j1 was recognized). Thanks to Maciej Mrozowski <reavertm@poczta.fm> for this patch. svn path=/main/trunk/; revision=12718
Diffstat (limited to 'pym')
-rw-r--r--pym/repoman/checks.py10
-rw-r--r--pym/repoman/errors.py1
2 files changed, 9 insertions, 2 deletions
diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py
index aee6d7c97..5fc1c1a93 100644
--- a/pym/repoman/checks.py
+++ b/pym/repoman/checks.py
@@ -322,6 +322,12 @@ class EMakeParallelDisabled(LineCheck):
re = re.compile(r'^\s*emake\s+-j\s*1\s')
error = errors.EMAKE_PARALLEL_DISABLED
+class EMakeParallelDisabledViaMAKEOPTS(LineCheck):
+ """Check for MAKEOPTS=-j1 that disables parallelization."""
+ repoman_check_name = 'upstream.workaround'
+ re = re.compile(r'^\s*MAKEOPTS=(\'|")?.*-j\s*1\b')
+ error = errors.EMAKE_PARALLEL_DISABLED_VIA_MAKEOPTS
+
class DeprecatedBindnowFlags(LineCheck):
"""Check for calls to the deprecated bindnow-flags function."""
repoman_check_name = 'ebuild.minorsyn'
@@ -354,8 +360,8 @@ _constant_checks = tuple((c() for c in (
EbuildUselessCdS, EbuildNestedDie,
EbuildPatches, EbuildQuotedA,
IUseUndefined, ImplicitRuntimeDeps, InheritAutotools,
- EMakeParallelDisabled, DeprecatedBindnowFlags,
- WantAutoDefaultValue, PortageInternal)))
+ EMakeParallelDisabled, EMakeParallelDisabledViaMAKEOPTS,
+ DeprecatedBindnowFlags, WantAutoDefaultValue, PortageInternal)))
def run_checks(contents, pkg):
checks = _constant_checks
diff --git a/pym/repoman/errors.py b/pym/repoman/errors.py
index 205913951..451e499ad 100644
--- a/pym/repoman/errors.py
+++ b/pym/repoman/errors.py
@@ -14,5 +14,6 @@ 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 = 'Upstream parallel compilation bug (ebuild calls emake -j1 on line: %d)'
+EMAKE_PARALLEL_DISABLED_VIA_MAKEOPTS = 'Upstream parallel compilation bug (MAKEOPTS=-j1 on line: %d)'
DEPRECATED_BINDNOW_FLAGS = 'Deprecated bindnow-flags call on line: %d'
PREPALLDOCS_ERROR = 'prepalldocs called on line: %d'