Skip to content

Commit

Permalink
NewerEAPIAvailable: handle better when no eclasses EAPI
Browse files Browse the repository at this point in the history
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: #679
Signed-off-by: Arthur Zamarin <[email protected]>
  • Loading branch information
arthurzam committed May 8, 2024
1 parent 5650f79 commit 4a7a02f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pkgcheck/checks/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def addition_checks(self, pkgs):
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)

Expand Down

0 comments on commit 4a7a02f

Please sign in to comment.