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 3B951138330 for ; Fri, 2 Sep 2016 20:49:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 891C621C08B; Fri, 2 Sep 2016 20:49:28 +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 033E521C088 for ; Fri, 2 Sep 2016 20:49:27 +0000 (UTC) Received: from naomi.gilbertsystems.net (d192-24-229-26.try.wideopenwest.com [24.192.26.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: floppym) by smtp.gentoo.org (Postfix) with ESMTPSA id EEF00340A35 for ; Fri, 2 Sep 2016 20:49:26 +0000 (UTC) From: Mike Gilbert To: gentoo-portage-dev@lists.gentoo.org Subject: [gentoo-portage-dev] [PATCH] news: Support News-Item-Format 2.0 Date: Fri, 2 Sep 2016 16:49:24 -0400 Message-Id: <20160902204924.6863-1-floppym@gentoo.org> X-Mailer: git-send-email 2.9.3 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 X-Archives-Salt: a19a72cf-2b22-4db5-a842-28ba06201c41 X-Archives-Hash: f6eb50ca93c6e072289d0b6b1e38310f 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