summaryrefslogtreecommitdiffstats
path: root/pym/repoman
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-04-23 13:15:56 -0700
committerZac Medico <zmedico@gentoo.org>2012-04-23 13:18:03 -0700
commita8889947c45a9fa81ca006b333466372b64f0344 (patch)
treeef9e1d72a626fc22adf10317b31dee84ac39e625 /pym/repoman
parentc31e5b74437b499b8361fb867e118e500c0c8d91 (diff)
downloadportage-a8889947c45a9fa81ca006b333466372b64f0344.tar.gz
portage-a8889947c45a9fa81ca006b333466372b64f0344.tar.bz2
portage-a8889947c45a9fa81ca006b333466372b64f0344.zip
repoman: fix portage.internal false positives
Diffstat (limited to 'pym/repoman')
-rw-r--r--pym/repoman/checks.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py
index ab4ddd9ec..733bbc3c1 100644
--- a/pym/repoman/checks.py
+++ b/pym/repoman/checks.py
@@ -664,13 +664,17 @@ class Eapi4GoneVars(LineCheck):
class PortageInternal(LineCheck):
repoman_check_name = 'portage.internal'
- re = re.compile(r'[^#]*\b(ecompress|ecompressdir|env-update|prepall|prepalldocs|preplib)\b')
+ ignore_comment = True
+ # Match when the command is preceded only by leading whitespace or a shell
+ # operator such as (, {, |, ||, or &&. This prevents false postives in
+ # things like elog messages, as reported in bug #413285.
+ re = re.compile(r'^(\s*|.*[|&{(]+\s*)\b(ecompress|ecompressdir|env-update|prepall|prepalldocs|preplib)\b')
def check(self, num, line):
"""Run the check on line and return error if there is one"""
m = self.re.match(line)
if m is not None:
- return ("'%s'" % m.group(1)) + " called on line: %d"
+ return ("'%s'" % m.group(2)) + " called on line: %d"
_constant_checks = tuple((c() for c in (
EbuildHeader, EbuildWhitespace, EbuildBlankLine, EbuildQuote,