Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 838484 - dev-util/pkgcheck-0.10.9-r1: mystery invalid package atom causes exception
Summary: dev-util/pkgcheck-0.10.9-r1: mystery invalid package atom causes exception
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michał Górny
Depends on:
Reported: 2022-04-15 13:20 UTC by Philippe Chaintreuil
Modified: 2022-04-15 19:20 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Chaintreuil 2022-04-15 13:20:51 UTC
This GURU commit[1] on the dev branch causes an exception to be thrown

pkgcheck scan: error: Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/pkgcore/ebuild/", line 261, in __init__
    sf(self, "_cpv", cpv.CPV(self.cpvstr, versioned=bool(self.op)))
  File "/usr/lib/python3.9/site-packages/pkgcore/ebuild/", line 317, in __init__
    raise InvalidCPV(cpvstr, f"invalid version '{pkg_chunks[-1]}'")
pkgcore.ebuild.errors.InvalidCPV: app-misc/vocabsieve-.4: invalid version '.4'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/pkgcheck/", line 227, in _run
    self._queue_work(sync_pipes, work_q)
  File "/usr/lib/python3.9/site-packages/pkgcheck/", line 172, in _queue_work
    for restrict in unversioned_source.itermatch(restriction):
  File "/usr/lib/python3.9/site-packages/pkgcheck/", line 378, in itermatch
    for pkg in super().itermatch(restrict, **kwargs):
  File "/usr/lib/python3.9/site-packages/pkgcheck/", line 247, in itermatch
    yield from super().itermatch(restrict, raw_pkg_cls=RawCPV, **kwargs)
  File "/usr/lib/python3.9/site-packages/pkgcore/repository/", line 298, in _internal_match
    for pkg in self._internal_gen_candidates(candidates, **kwargs):
  File "/usr/lib/python3.9/site-packages/pkgcore/repository/", line 295, in _internal_gen_candidates
    yield from sorter(pkg_filter(pkgs))
  File "/usr/lib/python3.9/site-packages/pkgcheck/", line 41, in __lt__
    return self.versioned_atom < other.versioned_atom
  File "/usr/lib/python3.9/site-packages/pkgcheck/", line 33, in versioned_atom
    return atom.atom(f'={self}')
  File "/usr/lib/python3.9/site-packages/snakeoil/", line 115, in __call__
    instance = super(WeakInstMeta, cls).__call__(*a, **kw)
  File "/usr/lib/python3.9/site-packages/pkgcore/ebuild/", line 263, in __init__
    raise errors.MalformedAtom(orig_atom) from e
pkgcore.ebuild.errors.MalformedAtom: invalid package atom: '=app-misc/vocabsieve-.4'

1.  I'd expect an error to be output, not an exception to be thrown
2.  I only see the commit referencing "6.4", never ".4"


Reproducible: Always

Steps to Reproduce:
1. git clone -b dev
2. git checkout 318009746930e0b83ed39e6b74968f2a44720b1c
3. pkgcheck scan --net
Comment 1 Philippe Chaintreuil 2022-04-15 13:30:43 UTC
Original commit author identified what's wonky.  There's an ebuild with the wrong name present after the package got renamed from ssmtool to vocabsieve.


Hope that helps.