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