Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 577414 - sys-apps/portage-2.2.26: package move triggers AttributeError: '_pkg_str' object has no attribute 'repo'
Summary: sys-apps/portage-2.2.26: package move triggers AttributeError: '_pkg_str' obj...
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Binary packages support (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 577640 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-03-14 19:13 UTC by Thomas R. (TRauMa)
Modified: 2016-03-28 21:06 UTC (History)
3 users (show)

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


Attachments
emerge --info (info,6.91 KB, text/plain)
2016-03-14 19:16 UTC, Thomas R. (TRauMa)
Details
/usr/portage/packages/Packages (Packages,361.93 KB, text/plain)
2016-03-14 20:54 UTC, Thomas R. (TRauMa)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas R. (TRauMa) 2016-03-14 19:13:35 UTC
I don't know if it's related to the recent fixes to the sync tree wrt always triggering package moves, so I opened a new bug for this:

Every emerge action triggers a 1Q-2016 package move which fails with an this backtrace: 

Performing Global Updates
(Could take a couple of minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  #='/var/db update'  @='/var/db move'
  s='/var/db SLOT move'  %='binary move'  S='binary SLOT move'
  p='update /etc/portage/package.*'
/usr/portage/profiles/updates/1Q-2016.................................
Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/emerge", line 50, in <module>
    retval = emerge_main()
  File "/usr/lib64/python2.7/site-packages/_emerge/main.py", line 1185, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib64/python2.7/site-packages/_emerge/actions.py", line 3109, in run_action
    return action_sync(emerge_config)
  File "/usr/lib64/python2.7/site-packages/_emerge/actions.py", line 1981, in action_sync
    retvals = syncer.auto_sync(options={'return-messages': False})
  File "/usr/lib64/python2.7/site-packages/portage/emaint/modules/sync/sync.py", line 98, in auto_sync
    emaint_opts=options)
  File "/usr/lib64/python2.7/site-packages/portage/emaint/modules/sync/sync.py", line 251, in _sync
    self._do_pkg_moves()
  File "/usr/lib64/python2.7/site-packages/portage/emaint/modules/sync/sync.py", line 265, in _do_pkg_moves
    quiet=("--quiet" in self.emerge_config.opts)):
  File "/usr/lib64/python2.7/site-packages/portage/_global_updates.py", line 41, in _global_updates
    quiet=quiet, if_mtime_changed=if_mtime_changed)
  File "/usr/lib64/python2.7/site-packages/portage/_global_updates.py", line 177, in _do_global_updates
    moves = bindb.move_slot_ent(update_cmd, repo_match=repo_match)
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/__init__.py", line 385, in move_slot_ent
    if repo_match is not None and not repo_match(mycpv.repo):
AttributeError: '_pkg_str' object has no attribute 'repo'


Reproducible: Always

Steps to Reproduce:
1. Run emerge with --package-moves=y or run fixpackages. Doesn't happen with --package-moves=n. Local overlays disabled.
Comment 1 Thomas R. (TRauMa) 2016-03-14 19:16:19 UTC
Created attachment 428244 [details]
emerge --info
Comment 2 Zac Medico gentoo-dev 2016-03-14 20:52:25 UTC
This is puzzling, because the 'repo' attribute should be there.

I wonder which of these slotmoves is triggering it:

slotmove net-irc/kvirc 4 0
slotmove <sci-libs/libint-2 0 1
slotmove >=sci-libs/libint-2 0 2
slotmove sys-devel/binutils 0 2.25.1

Please attach /usr/portage/packages/Packages in case it contains any clues.
Comment 3 Thomas R. (TRauMa) 2016-03-14 20:54:09 UTC
Created attachment 428252 [details]
/usr/portage/packages/Packages
Comment 4 Zac Medico gentoo-dev 2016-03-14 21:05:26 UTC
It must be something about your sys-devel/binutils-2.16.1-r3 binary package that triggers it. Please test to see if this command shows a repository:

portageq metadata / binary sys-devel/binutils-2.16.1-r3 repository
Comment 5 Thomas R. (TRauMa) 2016-03-14 21:15:12 UTC
portageq came up emtpy, and deleting the binpckg in question solved my problem. Thank you very much for your help! There were a lot of binpackages back from 2006 still around on this machine, I've been using the same installation for ten years now :).

I'll leave the bug open if you want to add a check in portage for someone else having this problem - if not you can of course just mark it fixed.
Comment 6 Brian Dolbec (RETIRED) gentoo-dev 2016-03-14 21:34:06 UTC
I might recommend you run eclean-pkg (from gentoolkit package) to clean out the old binpkgs.
Comment 7 Zac Medico gentoo-dev 2016-03-14 21:38:25 UTC
I'm going to try to reproduce this with a binary package that I have doctored to have missing 'repository' metadata.
Comment 8 lnrd.mnt 2016-03-18 09:30:00 UTC
*** Bug 577640 has been marked as a duplicate of this bug. ***