Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Commits Bug]: Crash with ValueError: max() iterable argument is empty in eclass EAPI check #679

@thesamesam

Description

@thesamesam

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I made a commit (7f3b5c6c35a33a98ba01ebfdc1a4dec627f56678) where sys-apps/moar started to inherit go-env.eclass and got:

$ pkgdev push
sys-apps/bfs
  RedundantVersion: version 3.1.3-r1: slot(0) keywords are overshadowed by version: 3.2

sys-apps/moar
  RedundantVersion: version 1.23.10: slot(0) keywords are overshadowed by version: 1.23.11
pkgdev push: error: Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/pkgcheck/pipeline.py", line 237, in _run
    if results := tuple(runner.run(restriction)):
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/pkgcheck/runners.py", line 71, in run
    yield from check.feed(item)
  File "/usr/lib/python3.12/site-packages/pkgcheck/checks/git.py", line 569, in feed
    yield from self.addition_checks(list(pkg_map["A"]))
  File "/usr/lib/python3.12/site-packages/pkgcheck/checks/git.py", line 391, in addition_checks
    common_max_eapi = max(frozenset.intersection(*eclass_eapis))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: max() iterable argument is empty

It looks like go-env.eclass has no # @SUPPORTED_EAPIS: eclassdoc...

Expected Behavior

Warn on bad eclass or ignore it and move on.

master commit id

d424971c3cf48adbc7c3e050ddb13b35f2cf5440

HEAD link

7f3b5c6c35a33a98ba01ebfdc1a4dec627f56678

pkgcheck version

pkgcheck 0.10.29 -- released Wed, 27 Mar 2024 22:50:41 +0200

pkgcore version

pkgcore 0.12.27 -- released Fri, 29 Mar 2024 19:47:35 +0300

git remotes configuration

$ git remote -v
history [email protected]:gentoo/gentoo-historical-2 (fetch)
history [email protected]:gentoo/gentoo-historical-2 (push)
origin git+ssh://[email protected]/repo/gentoo.git (fetch)
origin git+ssh://[email protected]/repo/gentoo.git (push)
sam [email protected]:thesamesam/gentoo.git (fetch)
sam [email protected]:thesamesam/gentoo.git (push)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions