public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH] news: Support News-Item-Format 2.0
@ 2016-09-02 20:49 Mike Gilbert
  2016-09-03 15:50 ` Zac Medico
  2016-09-04 16:58 ` [gentoo-portage-dev] [PATCH v2] " Mike Gilbert
  0 siblings, 2 replies; 12+ messages in thread
From: Mike Gilbert @ 2016-09-02 20:49 UTC (permalink / raw
  To: gentoo-portage-dev

Display-If-Installed already supported EAPI 5 atoms.
Use fnmatch for wildcard support on Display-If-Profile.
---
 pym/portage/news.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pym/portage/news.py b/pym/portage/news.py
index 177f9db..d6d2f07 100644
--- a/pym/portage/news.py
+++ b/pym/portage/news.py
@@ -271,7 +271,7 @@ class NewsItem(object):
 			# will never match
 			format_match = _formatRE.match(line)
 			if (format_match is not None and
-					not fnmatch.fnmatch(format_match.group(1), '1.*')):
+					not fnmatch.fnmatch(format_match.group(1), '[12].*')):
 				invalids.append((i + 1, line.rstrip('\n')))
 				break
 			if not line.startswith('D'):
@@ -325,7 +325,7 @@ class DisplayProfileRestriction(DisplayRestriction):
 		self.profile = profile
 
 	def checkRestriction(self, **kwargs):
-		if self.profile == kwargs['profile']:
+		if fnmatch.fnmatch(kwargs['profile'], self.profile):
 			return True
 		return False
 
-- 
2.9.3



^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-09-10 22:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-02 20:49 [gentoo-portage-dev] [PATCH] news: Support News-Item-Format 2.0 Mike Gilbert
2016-09-03 15:50 ` Zac Medico
2016-09-03 18:27   ` Ulrich Mueller
2016-09-03 22:12   ` Mike Gilbert
2016-09-04 16:58 ` [gentoo-portage-dev] [PATCH v2] " Mike Gilbert
2016-09-04 17:04   ` [gentoo-portage-dev] [PATCH v3] " Mike Gilbert
2016-09-07  7:26     ` Zac Medico
2016-09-07 21:03       ` [gentoo-portage-dev] [PATCH v4] " Mike Gilbert
2016-09-08  0:31         ` Zac Medico
2016-09-08  5:31           ` [gentoo-portage-dev] [PATCH v5] " Mike Gilbert
2016-09-10 22:05             ` Zac Medico
2016-09-07 21:06       ` [gentoo-portage-dev] [PATCH v3] " Mike Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox