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 BB040158649 for ; Fri, 12 May 2023 17:21:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 03BF8E07E6; Fri, 12 May 2023 17:21:14 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DE2CBE07E6 for ; Fri, 12 May 2023 17:21:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 0D726340815 for ; Fri, 12 May 2023 17:21:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9C5FAA5E for ; Fri, 12 May 2023 17:21:11 +0000 (UTC) From: "Arthur Zamarin" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arthur Zamarin" Message-ID: <1683911864.eb6a62d9547f3de6677cbf64e6bd674ff8c5ba82.arthurzam@gentoo> Subject: [gentoo-commits] proj/pkgcore/pkgcheck:master commit in: src/pkgcheck/checks/ X-VCS-Repository: proj/pkgcore/pkgcheck X-VCS-Files: src/pkgcheck/checks/profiles.py X-VCS-Directories: src/pkgcheck/checks/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: eb6a62d9547f3de6677cbf64e6bd674ff8c5ba82 X-VCS-Branch: master Date: Fri, 12 May 2023 17:21:11 +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: 07155b4b-480e-4222-9509-5325de79d2d7 X-Archives-Hash: 8659bbb27dd399fba222c55f70346515 commit: eb6a62d9547f3de6677cbf64e6bd674ff8c5ba82 Author: Arthur Zamarin gentoo org> AuthorDate: Fri May 12 17:17:44 2023 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Fri May 12 17:17:44 2023 +0000 URL: https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=eb6a62d9 ProfilesCheck: fix handling of profiles with neg_action package When a "packages" file under a profile declares "-*" (meaning to remove all defaults), pkgcore pushes a special token (`True`) into the packages set. This is taken by ProfileStack to clean up previous stack, but the check wasn't expecting this token. Fixes by adding skip for that token. Resolves: https://github.com/pkgcore/pkgcheck/issues/577 Signed-off-by: Arthur Zamarin gentoo.org> src/pkgcheck/checks/profiles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkgcheck/checks/profiles.py b/src/pkgcheck/checks/profiles.py index 5394dca7..3420e471 100644 --- a/src/pkgcheck/checks/profiles.py +++ b/src/pkgcheck/checks/profiles.py @@ -278,7 +278,7 @@ class ProfilesCheck(Check): ) def _pkg_atoms(self, filename, node, vals): for x in iflatten_instance(vals, atom_cls): - if not self.search_repo.match(x): + if not isinstance(x, bool) and not self.search_repo.match(x): yield UnknownProfilePackage(pjoin(node.name, filename), x) @verify_files(