Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 556464 - sys-apps/portage-2.2.20: emerging tbz2 fails with AttributeError: 'str' object has no attribute 'build_id'
Summary: sys-apps/portage-2.2.20: emerging tbz2 fails with AttributeError: 'str' objec...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Binary packages support (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 549914
  Show dependency tree
 
Reported: 2015-08-01 20:05 UTC by S. Gilles
Modified: 2015-09-22 01:24 UTC (History)
0 users

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


Attachments
emerge --info # very long (einfo,17.74 KB, text/plain)
2015-08-01 20:08 UTC, S. Gilles
Details

Note You need to log in before you can comment on or make changes to this bug.
Description S. Gilles 2015-08-01 20:05:24 UTC
Building a package as by `ebuild ... package`, or by `emerge --buildpkgonly ...` works as expected, but installing the resulting .tbz2 fails.

Reproducible: Always

Steps to Reproduce:
1. emerge --buildpkgonly sed
2. emerge sys-apps/sed-4.2.2.tbz2

alternately

1. ebuild /usr/portage/app-editors/nano/nano-2.4.2.ebuild package
2. emerge app-editors/nano-2.4.2.tbz2

Actual Results:  

These are the packages that would be merged, in order:

Calculating dependencies  ... done!
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.4/emerge", line 50, in <module>
    retval = emerge_main()
  File "/usr/lib64/python3.4/site-packages/_emerge/main.py", line 1154, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib64/python3.4/site-packages/_emerge/actions.py", line 3191, in run_action
    emerge_config.args, spinner)
  File "/usr/lib64/python3.4/site-packages/_emerge/actions.py", line 321, in action_build
    settings, trees, myopts, myparams, myaction, myfiles, spinner)
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 9117, in backtrack_depgraph
    myaction, myfiles, spinner)
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 9154, in _backtrack_depgraph
    success, favorites = mydepgraph.select_files(myfiles)
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 3580, in select_files
    return self._select_files(args)
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 3641, in _select_files
    onlydeps=onlydeps)
  File "/usr/lib64/python3.4/site-packages/_emerge/depgraph.py", line 6434, in _pkg
    installed=installed, onlydeps=onlydeps))
  File "/usr/lib64/python3.4/site-packages/_emerge/Package.py", line 241, in _gen_hash_key
    elements.extend([cpv.build_id, cpv.file_size,
AttributeError: 'str' object has no attribute 'build_id'


Expected Results:  
The packages should install.

# emerge -pvq portage
[ebuild   R   ] sys-apps/portage-2.2.20  USE="(ipc) -build -doc -epydoc (-selinux) -xattr" LINGUAS="-ru" PYTHON_TARGETS="python2_7 python3_4 -pypy -python3_3" 
 # emerge -pvq python
[ebuild   R   ] dev-lang/python-3.4.3  USE="gdbm ipv6 ncurses readline sqlite ssl threads tk xml -build -examples -hardened -wininst" q
Comment 1 S. Gilles 2015-08-01 20:08:22 UTC
Created attachment 408126 [details]
emerge --info # very long
Comment 2 Zac Medico gentoo-dev 2015-08-01 21:57:02 UTC
There's a patch in the following branch:

https://github.com/zmedico/portage/tree/bug_556464

You can test it like this:

echo '=sys-apps/portage-9999 **' >> /etc/portage/package.accept_keywords
portage_LIVE_BRANCH=bug_556464 \
portage_LIVE_REPO=https://github.com/zmedico/portage.git \
emerge -1 =sys-apps/portage-9999

I've posted it for review here:

https://archives.gentoo.org/gentoo-portage-dev/message/ed3d39daa46a3d3bd4cd958e2e70dac1
Comment 3 S. Gilles 2015-08-01 22:24:57 UTC
I can confirm that the given branch fixes this issue for me.
Comment 4 Zac Medico gentoo-dev 2015-08-02 00:45:36 UTC
Thanks for testing.

This is in the master branch now:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=7490b273027feef4ebf6a45c1c69df02195fd09a
Comment 5 S. Gilles 2015-08-02 01:22:58 UTC
Great - thanks for the quick fix.
Comment 6 Brian Dolbec (RETIRED) gentoo-dev 2015-09-22 01:24:58 UTC
Released in portage-2.2.21