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...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All All
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
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: ---


Attachments

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/main.py", line 1289, in emerge_main
>     return run_action(emerge_config)
>   File "/usr/lib64/python3.4/site-packages/_emerge/actions.py", line 3222, in run_action
>     emerge_config.args, spinner)
>   File "/usr/lib64/python3.4/site-packages/_emerge/actions.py", line 2209, in action_uninstall
>     scheduler=sched_iface)
>   File "/usr/lib64/python3.4/site-packages/_emerge/actions.py", line 683, in action_depclean
>     myopts, action, args_set, spinner)
>   File "/usr/lib64/python3.4/site-packages/_emerge/actions.py", line 985, in calc_depclean
>     if unresolved_deps():
>   File "/usr/lib64/python3.4/site-packages/_emerge/actions.py", line 948, in unresolved_deps
>     vardb.match(_unicode(atom)):
>   File "/usr/lib64/python3.4/site-packages/_emerge/FakeVartree.py", line 111, in _match_wrapper
>     matches = self._match(cpv, use_cache=use_cache)
>   File "/usr/lib64/python3.4/site-packages/_emerge/resolver/DbapiProvidesIndex.py", 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:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=925eadd210dbc3802000d92f458ae7029832273e

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):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=e8067a8e6fbdaccca5915e66c77518e82b090401

commit e8067a8e6fbdaccca5915e66c77518e82b090401
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-06-05 20:41:40 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
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.
    
    Bug: https://bugs.gentoo.org/657420

 pym/_emerge/actions.py | 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):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=252ca4b3c1000a23f3c32b01725b5b3c7da5e7d4

commit 252ca4b3c1000a23f3c32b01725b5b3c7da5e7d4
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-06-06 03:53:30 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
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.
    
    See: https://gitweb.gentoo.org/proj/portage.git/commit/?id=937d0156aa060bdba9095313dedbb62e0a993aea
    See: https://gitweb.gentoo.org/proj/portage.git/commit/?id=9e07f3a45c1b321edd07530b278498cb09f8983c
    See: https://gitweb.gentoo.org/proj/portage.git/commit/?id=1fc628eead43fa5da4b142479aa004ded8acceab
    Closes: https://bugs.gentoo.org/657436
    See: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e8067a8e6fbdaccca5915e66c77518e82b090401
    Closes: https://bugs.gentoo.org/657420
    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):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cfe44e894ae844ab8768dfd5584506750d0be297

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

    sys-apps/portage: 2.3.40-r1 revbump for regression fixes
    
    Fixes: https://bugs.gentoo.org/656610
    Fixes: https://bugs.gentoo.org/656750
    Fixes: https://bugs.gentoo.org/656942
    Fixes: https://bugs.gentoo.org/657360
    Fixes: https://bugs.gentoo.org/657420
    Fixes: https://bugs.gentoo.org/657436
    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(-)