Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 653372 - =sys-apps/portage-2.3.29: emerge --search returns: AttributeError: '_pkg_str' object has no attribute '_db'
Summary: =sys-apps/portage-2.3.29: emerge --search returns: AttributeError: '_pkg_str'...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL: https://gitweb.gentoo.org/proj/portag...
Whiteboard:
Keywords: InVCS, REGRESSION
Depends on:
Blocks: 651804
  Show dependency tree
 
Reported: 2018-04-17 12:14 UTC by Lars Wendler (Polynomial-C)
Modified: 2018-04-17 18:55 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 Lars Wendler (Polynomial-C) gentoo-dev 2018-04-17 12:14:46 UTC
# emerge -s docbook-sgml
  
[ Results for search key : docbook-sgml ]
Searching...

*  app-text/docbook-sgml
      Latest version available: 1.0
      Latest version installed: [ Not Installed ]
      Size of files: 0 KiB
      Homepage:      http://www.docbook.org/sgml/
      Description:   A helper package for sgml docbook
      License:       GPL-2

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.5/emerge", line 51, in <module>
    retval = emerge_main()
  File "/usr/lib64/python3.5/site-packages/_emerge/main.py", line 1286, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib64/python3.5/site-packages/_emerge/actions.py", line 3193, in run_action
    emerge_config.opts, emerge_config.args, spinner)
  File "/usr/lib64/python3.5/site-packages/_emerge/actions.py", line 2011, in action_search
    searchinstance.output()
  File "/usr/lib64/python3.5/site-packages/_emerge/search.py", line 391, in output
    "bestmatch-visible", match)
  File "/usr/lib64/python3.5/site-packages/_emerge/search.py", line 227, in _xmatch
    if not self._visible(db, cpv, metadata):
  File "/usr/lib64/python3.5/site-packages/_emerge/search.py", line 138, in _visible
    metadata=metadata).visible
  File "/usr/lib64/python3.5/site-packages/_emerge/Package.py", line 72, in __init__
    db = self.cpv._db
AttributeError: '_pkg_str' object has no attribute '_db'


This is caused by the commit bfe7892202b85c46ff127048ca1cc752c54b186c (see URL). Reverting this commit fixes --search
Comment 1 Larry the Git Cow gentoo-dev 2018-04-17 17:18:07 UTC
The bug has been referenced in the following commit(s):

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

commit 6b50f39c3d45456b40f21ca85c6d57296c64c377
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-04-17 17:12:44 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-04-17 17:15:44 +0000

    IndexedVardb: pass db to _pkg_str (bug 653372)
    
    Fix an AttributeError when emerge --search contructs a Package instance
    in order to check visibility of an installed package.
    
    Fixes: bfe7892202b8 ("_pkg_str: add _db attribute (bug 640318)")
    Bug: https://bugs.gentoo.org/653372

 pym/portage/dbapi/IndexedVardb.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)}
Comment 2 Zac Medico gentoo-dev 2018-04-17 18:55:07 UTC
Fixed in portage-2.3.30. Thanks!