Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 727596 - app-portage/gentoolkit: eclean-pkg --changed-deps InvalidAtom if binary package EAPI differs from corresponding ebuild EAPI
Summary: app-portage/gentoolkit: eclean-pkg --changed-deps InvalidAtom if binary packa...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage Tools Team
Keywords: InVCS
Depends on:
Reported: 2020-06-08 22:25 UTC by Zac Medico
Modified: 2020-06-09 17:30 UTC (History)
1 user (show)

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 Zac Medico gentoo-dev 2020-06-08 22:25:13 UTC
It applies the binary package EAPI to the corresponding ebuild dependencies:

> Nu amd64-hardened-bootstrap # PKGDIR=. eclean-pkg --changed-deps
>  * Building file list for packages cleaning...
> Traceback (most recent call last):
>   File "/usr/lib/python3.7/site-packages/portage/dep/", line 739, in use_reduce
>     is_valid_flag=is_valid_flag)
>   File "/usr/lib/python3.7/site-packages/portage/dep/", line > 378, in __init__
>     raise InvalidAtom(self)
> portage.exception.InvalidAtom: >=sys-libs/ncurses-5.9-r3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_riscv_lp64d(-)?,abi_riscv_lp64(-)?,abi_s390_32(-)?,abi_s390_64(-)?]
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>   File "/usr/lib/python-exec/python3.7/eclean-pkg", line 44, in <module>
>     main()
>   File "/usr/lib/python3.7/site-packages/gentoolkit/eclean/", line 509, in main
>     output=output)
>   File "/usr/lib/python3.7/site-packages/gentoolkit/eclean/", line 387, in doAction
>     pkgdir=pkgdir,
>   File "/usr/lib/python3.7/site-packages/gentoolkit/eclean/", line 586, in findPackages
>     if _deps_equal(binpkg_deps, ebuild_deps, cpv.eapi, uselist):
>   File "/usr/lib/python3.7/site-packages/gentoolkit/eclean/", line 498, in _deps_equal
>     deps_b = use_reduce(deps_b, uselist=uselist, eapi=eapi, token_class=Atom)
>   File "/usr/lib/python3.7/site-packages/portage/dep/", line 744, in use_reduce
>     % (e, pos+> ), errors=(e,))
> portage.exception.InvalidDependString: Invalid atom (>=sys-libs/ncurses-5.9-r3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_riscv_lp64d(-)?,abi_riscv_lp64(-)?,abi_s390_32(-)?,abi_s390_64(-)?]), token >
Comment 1 Rick Farina (Zero_Chaos) gentoo-dev 2020-06-09 17:24:59 UTC
I reported this originally via irc and can confirm the patch fixes my issue.  Thanks!
Comment 2 Larry the Git Cow gentoo-dev 2020-06-09 17:29:35 UTC
The bug has been referenced in the following commit(s):

commit c0b355cf51ca73ad9dd52a0f5c1aebf807be42fc
Author:     Zac Medico <>
AuthorDate: 2020-06-09 01:54:46 +0000
Commit:     Zac Medico <>
CommitDate: 2020-06-09 01:57:07 +0000

    eclean --changed-deps: fix EAPI logic (bug 727596)
    Use separate variables for binary package and corresponding ebuild
    EAPI values, since the ebuild EAPI may have changed. This avoids
    a possible InvalidAtom exception as reported in bug 727596.
    Signed-off-by: Zac Medico <>

 pym/gentoolkit/eclean/ | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)