Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 657420 - sys-apps/portage-2.3.40: emerge --depclean --ignore-soname-deps=n AttributeError: 'str' object has no attribute 'soname'
Summary: sys-apps/portage-2.3.40: emerge --depclean --ignore-soname-deps=n AttributeEr...
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
Keywords: InVCS
Depends on:
Blocks: 694246 651804
  Show dependency tree
Reported: 2018-06-05 19:38 UTC by Zac Medico
Modified: 2019-09-12 23:02 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 Zac Medico gentoo-dev 2018-06-05 19:38:07 UTC
> Traceback (most recent call last):
>   File "/usr/lib/python-exec/python3.4/emerge", line 53, in <module>
>     retval = emerge_main()
>   File "/usr/lib64/python3.4/site-packages/_emerge/", line 1289, in emerge_main
>     return run_action(emerge_config)
>   File "/usr/lib64/python3.4/site-packages/_emerge/", line 3222, in run_action
>     emerge_config.args, spinner)
>   File "/usr/lib64/python3.4/site-packages/_emerge/", line 2209, in action_uninstall
>     scheduler=sched_iface)
>   File "/usr/lib64/python3.4/site-packages/_emerge/", line 683, in action_depclean
>     myopts, action, args_set, spinner)
>   File "/usr/lib64/python3.4/site-packages/_emerge/", line 985, in calc_depclean
>     if unresolved_deps():
>   File "/usr/lib64/python3.4/site-packages/_emerge/", line 948, in unresolved_deps
>     vardb.match(_unicode(atom)):
>   File "/usr/lib64/python3.4/site-packages/_emerge/", line 111, in _match_wrapper
>     matches = self._match(cpv, use_cache=use_cache)
>   File "/usr/lib64/python3.4/site-packages/_emerge/resolver/", line 40, in match
>     if atom.soname:
> AttributeError: 'str' object has no attribute 'soname'
Comment 1 Zac Medico gentoo-dev 2018-06-05 19:47:13 UTC
The _unicode(atom) that triggers this comes from this commit in 2012:

I think we can get the desired result by substituting atom.without_use for _unicode(atom).
Comment 2 Zac Medico gentoo-dev 2018-06-05 19:57:54 UTC
Actually, the intention here handle a very special case where the atom doesn't match due to missing IUSE, but the evaluated atom appears to match after conditionals are evaluated away. There can be a mix of conditional and unconditional USE deps, so atom.without_use is not quite right, and Atom(_unicode(atom)) will give the intended result.
Comment 3 Larry the Git Cow gentoo-dev 2018-06-05 20:49:50 UTC
The bug has been referenced in the following commit(s):

commit e8067a8e6fbdaccca5915e66c77518e82b090401
Author:     Zac Medico <>
AuthorDate: 2018-06-05 20:41:40 +0000
Commit:     Zac Medico <>
CommitDate: 2018-06-05 20:41:40 +0000

    emerge --depclean: 'str' has no attribute 'soname' (bug 657420)
    Convert str to Atom, in order to avoid an AttributeError in the
    DbapiProvidesIndex.match method. Also, add comment explaining the
    reason for _unicode(atom) usage here, since it's not obvious.

 pym/_emerge/ | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
Comment 4 Larry the Git Cow gentoo-dev 2018-06-06 05:19:43 UTC
The bug has been closed via the following commit(s):

commit 252ca4b3c1000a23f3c32b01725b5b3c7da5e7d4
Author:     Zac Medico <>
AuthorDate: 2018-06-06 03:53:30 +0000
Commit:     Zac Medico <>
CommitDate: 2018-06-06 05:19:33 +0000

    sys-apps/portage: fix Ctrl-C CancelledError regression (bug 657436)
    Fix an annoying regression involving a CancelledError exception raised
    during Ctrl-C interrupt handling. Also include the small patch for
    bug 657420. Remove the sed call that applied commit d07a47ff3c06 for
    bug 656942, and apply the fix using a patch instead.
    Package-Manager: Portage-2.3.40, Repoman-2.3.9

 sys-apps/portage/Manifest              |  3 ++-
 sys-apps/portage/portage-2.3.40.ebuild | 10 ++++------
 2 files changed, 6 insertions(+), 7 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2018-06-06 16:33:29 UTC
The bug has been closed via the following commit(s):

commit cfe44e894ae844ab8768dfd5584506750d0be297
Author:     Zac Medico <>
AuthorDate: 2018-06-06 16:26:12 +0000
Commit:     Zac Medico <>
CommitDate: 2018-06-06 16:27:21 +0000

    sys-apps/portage: 2.3.40-r1 revbump for regression fixes
    Package-Manager: Portage-2.3.40, Repoman-2.3.9

 sys-apps/portage/{portage-2.3.40.ebuild => portage-2.3.40-r1.ebuild} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)