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 3E577158064 for ; Wed, 8 May 2024 16:32:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7DB102BC01D; Wed, 8 May 2024 16:32:40 +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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 60AA82BC01D for ; Wed, 8 May 2024 16:32:40 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5C5C43431CA for ; Wed, 8 May 2024 16:32:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BE4641A3F for ; Wed, 8 May 2024 16:32:37 +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: <1715185848.4a7a02f60c9f87ad85670e0e798c5aadb8096c92.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/git.py X-VCS-Directories: src/pkgcheck/checks/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: 4a7a02f60c9f87ad85670e0e798c5aadb8096c92 X-VCS-Branch: master Date: Wed, 8 May 2024 16:32:37 +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: f9bfa3e6-5646-41e3-a2d6-91f1c67662b8 X-Archives-Hash: 2a50800ff87f7e067b9fee652e4f1961 commit: 4a7a02f60c9f87ad85670e0e798c5aadb8096c92 Author: Arthur Zamarin gentoo org> AuthorDate: Wed May 8 16:30:48 2024 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Wed May 8 16:30:48 2024 +0000 URL: https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=4a7a02f6 NewerEAPIAvailable: handle better when no eclasses EAPI It might sometimes not find any intersection of eclasses EAPIs, in which it is better to not report anything then to report a false positive or worse, to explode with exception. Resolves: https://github.com/pkgcore/pkgcheck/issues/679 Signed-off-by: Arthur Zamarin gentoo.org> src/pkgcheck/checks/git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkgcheck/checks/git.py b/src/pkgcheck/checks/git.py index a2619491..b6777161 100644 --- a/src/pkgcheck/checks/git.py +++ b/src/pkgcheck/checks/git.py @@ -388,7 +388,7 @@ class GitPkgCommitsCheck(GentooRepoCheck, GitCommitsCheck): for eclass in new_pkg.inherit ) current_eapi = int(str(new_pkg.eapi)) - common_max_eapi = max(frozenset.intersection(*eclass_eapis)) + common_max_eapi = max(frozenset.intersection(*eclass_eapis), 0) if common_max_eapi > current_eapi: yield NewerEAPIAvailable(common_max_eapi, pkg=new_pkg)