From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SMPgN-0005Mw-TS for garchives@archives.gentoo.org; Mon, 23 Apr 2012 20:16:24 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7DA8DE0E21; Mon, 23 Apr 2012 20:16:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 4AF57E0E21 for ; Mon, 23 Apr 2012 20:16:16 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B3D891B400D for ; Mon, 23 Apr 2012 20:16:15 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 7C147E5402 for ; Mon, 23 Apr 2012 20:16:14 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1335212156.84b6a6df608298757b39d092afcddd0ebc5b02f1.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/repoman/ X-VCS-Repository: proj/portage X-VCS-Files: pym/repoman/checks.py X-VCS-Directories: pym/repoman/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 84b6a6df608298757b39d092afcddd0ebc5b02f1 X-VCS-Branch: master Date: Mon, 23 Apr 2012 20:16:14 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: f020dd61-69a6-4086-9230-193eb0e6cc66 X-Archives-Hash: 8463a71660799466a41faa9eac190939 commit: 84b6a6df608298757b39d092afcddd0ebc5b02f1 Author: Zac Medico gentoo org> AuthorDate: Mon Apr 23 20:15:56 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Apr 23 20:15:56 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D84b6a6df repoman: fix portage.internal false positives --- pym/repoman/checks.py | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py index ab4ddd9..89a71d8 100644 --- a/pym/repoman/checks.py +++ b/pym/repoman/checks.py @@ -664,13 +664,17 @@ class Eapi4GoneVars(LineCheck): =20 class PortageInternal(LineCheck): repoman_check_name =3D 'portage.internal' - re =3D re.compile(r'[^#]*\b(ecompress|ecompressdir|env-update|prepall|p= repalldocs|preplib)\b') + ignore_comment =3D True + # Match when the command is preceded only by leading whitespace or a sh= ell + # operator such as (, {, |, ||, or &&. This prevents false postives in = things + # like elog messages, as reported in bug #413285. + re =3D re.compile(r'^(\s*|.*[|&{(]+\s*)\b(ecompress|ecompressdir|env-up= date|prepall|prepalldocs|preplib)\b') =20 def check(self, num, line): """Run the check on line and return error if there is one""" m =3D 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" =20 _constant_checks =3D tuple((c() for c in ( EbuildHeader, EbuildWhitespace, EbuildBlankLine, EbuildQuote,