1 |
On 09/07/2016 02:03 PM, Mike Gilbert wrote: |
2 |
> Validate Display-If-Installed with EAPI 0 or 5. |
3 |
> Add support for trailing wildcard matching for Display-If-Profile. |
4 |
> |
5 |
> Bug: https://bugs.gentoo.org/577372 |
6 |
> --- |
7 |
> pym/portage/news.py | 50 ++++++++++++++++++++++++++++++++++++++------------ |
8 |
> 1 file changed, 38 insertions(+), 12 deletions(-) |
9 |
> |
10 |
> diff --git a/pym/portage/news.py b/pym/portage/news.py |
11 |
> index 177f9db..e53e905 100644 |
12 |
> --- a/pym/portage/news.py |
13 |
> +++ b/pym/portage/news.py |
14 |
> @@ -197,6 +197,7 @@ _formatRE = re.compile("News-Item-Format:\s*([^\s]*)\s*$") |
15 |
> _installedRE = re.compile("Display-If-Installed:(.*)\n") |
16 |
> _profileRE = re.compile("Display-If-Profile:(.*)\n") |
17 |
> _keywordRE = re.compile("Display-If-Keyword:(.*)\n") |
18 |
> +_bad_wc_RE = re.compile(r'.*([^/]\*|\*.)') |
19 |
|
20 |
Maybe it's better if we use a regex that defines a valid profile string: |
21 |
|
22 |
_valid_profile_RE = re.compile(r'^[^*]+(/\*)?$') |
23 |
-- |
24 |
Thanks, |
25 |
Zac |