diff --git a/NEWS b/NEWS index 773df02b0b..cabd52035c 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,8 @@ Features: * TODO Bug fixes: +* news: Fix matching profile paths with Display-If-Profile in some cases. + * checksum: Rewrite Whirlpool implementation as a C extension to substantially improve performance (bug #885909). diff --git a/lib/portage/news.py b/lib/portage/news.py index 14401814de..f81debe977 100644 --- a/lib/portage/news.py +++ b/lib/portage/news.py @@ -279,11 +279,16 @@ def isRelevant(self, vardb, config, profile): kwargs = {"vardb": vardb, "config": config, "profile": profile} - all_match = all( - restriction.checkRestriction(**kwargs) - for values in self.restrictions.values() - for restriction in values - ) + all_match = True + for values in self.restrictions.values(): + matches = [restriction.checkRestriction(**kwargs) for restriction in values] + any_match = any(matches) + + # If, for a single restriction, we didn't match anything, then we obviously + # didn't match everything, so just bail out. + if not any_match: + all_match = False + break return all_match