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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5AEBB158094 for ; Mon, 11 Jul 2022 23:02:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 71215E1036; Mon, 11 Jul 2022 23:02:08 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 52FB4E1036 for ; Mon, 11 Jul 2022 23:02:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 548D43410B4 for ; Mon, 11 Jul 2022 23:02:07 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C499F529 for ; Mon, 11 Jul 2022 23:02:05 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1657580464.1ffaa70544f34e93df24c0a175105a900bf272bf.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/news.py X-VCS-Directories: lib/portage/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 1ffaa70544f34e93df24c0a175105a900bf272bf X-VCS-Branch: master Date: Mon, 11 Jul 2022 23:02:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 33a1632f-093e-478c-82a9-942b82eceb9d X-Archives-Hash: 4bf23ee19433118a47f8d81d1bffc8b4 commit: 1ffaa70544f34e93df24c0a175105a900bf272bf Author: Sam James gentoo org> AuthorDate: Mon Jul 11 04:50:24 2022 +0000 Commit: Sam James gentoo org> CommitDate: Mon Jul 11 23:01:04 2022 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=1ffaa705 news: fix isRelevant check Manifested as all news items being shown, even if (very) irrelevant to the running system (e.g. different arch, packages not installed, ...). I think the distinction here is that with the previous state, we'd end up with _only_ Trues, or nothing (an element would be omitted), whereas this commit means we end up considering a possible mixed sequence. Closes: https://bugs.gentoo.org/857669 Fixes: 9e24d0143450628f334cdb62e579efafd1bfd2ba Reported-by: kurly Signed-off-by: Sam James gentoo.org> lib/portage/news.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/portage/news.py b/lib/portage/news.py index 132e050f2..6b2996c31 100644 --- a/lib/portage/news.py +++ b/lib/portage/news.py @@ -281,10 +281,9 @@ class NewsItem: kwargs = {"vardb": vardb, "config": config, "profile": profile} all_match = all( - True + restriction.checkRestriction(**kwargs) for values in self.restrictions.values() for restriction in values - if restriction.checkRestriction(**kwargs) ) return all_match