From d9f29fadbfaf654eee722af37b475bd7da0fa227 Mon Sep 17 00:00:00 2001
From: Zac Medico <zmedico@gentoo.org>
Date: Fri, 12 Dec 2008 21:20:17 +0000
Subject: [PATCH] Bug #250212 - Add a new 'upstream.workaround' qa category,
 and use it for the EMakeParallelDisabled check. Thanks to Mike Auty
 <ikelos@g.o> for this patch. (trunk r12179)

svn path=/main/branches/2.1.6/; revision=12215
---
 bin/repoman           | 4 +++-
 man/repoman.1         | 4 ++++
 pym/repoman/checks.py | 2 +-
 pym/repoman/errors.py | 2 +-
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/bin/repoman b/bin/repoman
index da3e4fcdf..413971354 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -314,7 +314,8 @@ qahelp={
 	"virtual.versioned":"PROVIDE contains virtuals with versions",
 	"virtual.exists":"PROVIDE contains existing package names",
 	"virtual.unavailable":"PROVIDE contains a virtual which contains no profile default",
-	"usage.obsolete":"The ebuild makes use of an obsolete construct"
+	"usage.obsolete":"The ebuild makes use of an obsolete construct",
+	"upstream.workaround":"The ebuild works around an upstream bug, an upstream bug should be filed and tracked in bugs.gentoo.org"
 }
 
 qacats = qahelp.keys()
@@ -350,6 +351,7 @@ qawarnings = set((
 "virtual.exists",
 "virtual.unavailable",
 "usage.obsolete",
+"upstream.workaround",
 "LIVEVCS.stable"
 ))
 
diff --git a/man/repoman.1 b/man/repoman.1
index 48a18986f..d6f196e01 100644
--- a/man/repoman.1
+++ b/man/repoman.1
@@ -263,6 +263,10 @@ Bad metadata.xml files
 .B metadata.missing
 Missing metadata.xml files
 .TP
+.B upstream.workaround
+The ebuild works around an upstream bug, an upstream bug should be filed and
+tracked in bugs.gentoo.org
+.TP
 .B usage.obsolete
 The ebuild makes use of an obsolete construct
 .TP
diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py
index c9415b759..c90b54f7b 100644
--- a/pym/repoman/checks.py
+++ b/pym/repoman/checks.py
@@ -291,7 +291,7 @@ class IUseUndefined(LineCheck):
 
 class EMakeParallelDisabled(LineCheck):
 	"""Check for emake -j1 calls which disable parallelization."""
-	repoman_check_name = 'ebuild.minorsyn'
+	repoman_check_name = 'upstream.workaround'
 	re = re.compile(r'^\s*emake\s+-j\s*1\s')
 	error = errors.EMAKE_PARALLEL_DISABLED
 
diff --git a/pym/repoman/errors.py b/pym/repoman/errors.py
index 7c54cc13d..7f45bea21 100644
--- a/pym/repoman/errors.py
+++ b/pym/repoman/errors.py
@@ -13,5 +13,5 @@ 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'
+EMAKE_PARALLEL_DISABLED = 'Upstream parallel compilation bug (ebuild calls emake -j1 on line: %d)'
 DEPRECATED_BINDNOW_FLAGS = 'Deprecated bindnow-flags call on line: %d'
-- 
2.26.2