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 1ScpJD-00020F-5b for garchives@archives.gentoo.org; Fri, 08 Jun 2012 02:52:19 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BAFCBE055E; Fri, 8 Jun 2012 02:52:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 8EA9DE055E for ; Fri, 8 Jun 2012 02:52:06 +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 F40C61B400E for ; Fri, 8 Jun 2012 02:52:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id E6C24E5432 for ; Fri, 8 Jun 2012 02:52:03 +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: <1339123908.dcdfed5f9487f4232affc156518e05e00c10da5f.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: dcdfed5f9487f4232affc156518e05e00c10da5f X-VCS-Branch: master Date: Fri, 8 Jun 2012 02:52:03 +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: 902f068f-17a2-48d1-b603-bd9fc17e8598 X-Archives-Hash: d77bf372dbc1da055bdc3af0fe70ea8f commit: dcdfed5f9487f4232affc156518e05e00c10da5f Author: Zac Medico gentoo org> AuthorDate: Fri Jun 8 02:51:48 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Jun 8 02:51:48 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Ddcdfed5f InheritEclass: avoid false positive in func regex --- pym/repoman/checks.py | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py index 65f024c..2864d67 100644 --- a/pym/repoman/checks.py +++ b/pym/repoman/checks.py @@ -469,7 +469,10 @@ class InheritEclass(LineCheck): self._ignore_missing =3D ignore_missing inherit_re =3D eclass self._inherit_re =3D re.compile(r'^(\s*|.*[|&]\s*)\binherit\s(.*\s)?%s= (\s|$)' % inherit_re) - self._func_re =3D re.compile(r'\b(' + '|'.join(funcs) + r')\b') + # Match when the function 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. + self._func_re =3D re.compile(r'(^|[|&{(])\s*\b(' + '|'.join(funcs) + r= ')\b') =20 def new(self, pkg): self.repoman_check_name =3D 'inherit.missing' @@ -493,7 +496,7 @@ class InheritEclass(LineCheck): if s: self._func_call =3D True return '%s.eclass is not inherited, but "%s" found at line: %s' % \ - (self._eclass, s.group(0), '%d') + (self._eclass, s.group(2), '%d') elif not self._func_call: self._func_call =3D self._func_re.search(line) =20