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 1SdB28-0005Jf-3a for garchives@archives.gentoo.org; Sat, 09 Jun 2012 02:04:08 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8DBE7E0752; Sat, 9 Jun 2012 02:04:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 56DBAE0752 for ; Sat, 9 Jun 2012 02:04:00 +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 BC2341B4016 for ; Sat, 9 Jun 2012 02:03:59 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 7FD21E5432 for ; Sat, 9 Jun 2012 02:03:58 +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: <1339207422.a199763028a451389a92b8e58cab20cda83710b5.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: a199763028a451389a92b8e58cab20cda83710b5 X-VCS-Branch: master Date: Sat, 9 Jun 2012 02:03:58 +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: adc70bea-5c6b-43b8-9dde-568fe8cc62ca X-Archives-Hash: e179b4f1f7c35f2e73586730bfdafb32 commit: a199763028a451389a92b8e58cab20cda83710b5 Author: Zac Medico gentoo org> AuthorDate: Sat Jun 9 02:03:42 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Jun 9 02:03:42 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Da1997630 InheritEclass: avoid false positive in func regex --- pym/repoman/checks.py | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py index 2864d67..92a1e5a 100644 --- a/pym/repoman/checks.py +++ b/pym/repoman/checks.py @@ -469,10 +469,11 @@ 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) - # 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') + # Match when the function is preceded only by leading whitespace, a + # shell operator such as (, {, |, ||, or &&, or optional variable + # setting(s). This prevents false postives in things like elog + # messages, as reported in bug #413285. + self._func_re =3D re.compile(r'(^|[|&{(])\s*(\w+=3D.*)?\b(' + '|'.join= (funcs) + r')\b') =20 def new(self, pkg): self.repoman_check_name =3D 'inherit.missing' @@ -496,7 +497,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(2), '%d') + (self._eclass, s.group(3), '%d') elif not self._func_call: self._func_call =3D self._func_re.search(line) =20