From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 00C17138330 for ; Thu, 8 Sep 2016 00:31:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EC488E0B3C; Thu, 8 Sep 2016 00:31:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6734CE0B39 for ; Thu, 8 Sep 2016 00:31:05 +0000 (UTC) Received: from [10.128.12.197] (unknown [100.42.98.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: zmedico) by smtp.gentoo.org (Postfix) with ESMTPSA id F344E340A6A for ; Thu, 8 Sep 2016 00:31:03 +0000 (UTC) Subject: Re: [gentoo-portage-dev] [PATCH v4] news: Support News-Item-Format 2.0 To: gentoo-portage-dev@lists.gentoo.org References: <52d220b8-b6b6-5c4e-6940-31deb1fc3ba0@gentoo.org> <20160907210357.15448-1-floppym@gentoo.org> From: Zac Medico Message-ID: <2930a3f7-4caa-bd31-599b-4eda22f837ec@gentoo.org> Date: Wed, 7 Sep 2016 17:31:01 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 In-Reply-To: <20160907210357.15448-1-floppym@gentoo.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Archives-Salt: 6958e573-0ebd-45b1-b770-29a4c9b751bf X-Archives-Hash: a05b12606d8458b02d16981fd12d26d5 On 09/07/2016 02:03 PM, Mike Gilbert wrote: > Validate Display-If-Installed with EAPI 0 or 5. > Add support for trailing wildcard matching for Display-If-Profile. > > Bug: https://bugs.gentoo.org/577372 > --- > pym/portage/news.py | 50 ++++++++++++++++++++++++++++++++++++++------------ > 1 file changed, 38 insertions(+), 12 deletions(-) > > diff --git a/pym/portage/news.py b/pym/portage/news.py > index 177f9db..e53e905 100644 > --- a/pym/portage/news.py > +++ b/pym/portage/news.py > @@ -197,6 +197,7 @@ _formatRE = re.compile("News-Item-Format:\s*([^\s]*)\s*$") > _installedRE = re.compile("Display-If-Installed:(.*)\n") > _profileRE = re.compile("Display-If-Profile:(.*)\n") > _keywordRE = re.compile("Display-If-Keyword:(.*)\n") > +_bad_wc_RE = re.compile(r'.*([^/]\*|\*.)') Maybe it's better if we use a regex that defines a valid profile string: _valid_profile_RE = re.compile(r'^[^*]+(/\*)?$') -- Thanks, Zac