I just synced my tree and after it, portage failed with: -----8<------ 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/3Q-2011.................. /var/cache/edb/vdb_metadata.pickle Traceback (most recent call last): File "/usr/bin/emerge", line 43, in <module> retval = emerge_main() File "/usr/lib64/portage/pym/_emerge/main.py", line 1532, in emerge_main _global_updates(trees, mtimedb["updates"], quiet=("--quiet" in myopts)): File "/usr/lib64/portage/pym/portage/_global_updates.py", line 206, in _global_updates repo_map, match_callback=_config_repo_match) File "/usr/lib64/portage/pym/portage/update.py", line 288, in update_config_files if match_callback(repo_name, atom, new_atom): File "/usr/lib64/portage/pym/portage/_global_updates.py", line 199, in _config_repo_match repository = vardb.aux_get(best(matches), ['repository'])[0] File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 629, in aux_get pkg_data = self._aux_cache["packages"].get(mycpv) File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 531, in _aux_cache self._aux_cache_init() File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 554, in _aux_cache_init aux_cache = mypickle.load() AttributeError: 'dict' object has no attribute 'append' -----8<------ The cause of the problem might have been file-system damage I encountered a few months back. As far as I understand it, the cPickler deserializes some python structures saved into a file and raises an AttributeError when trying to restore an errounously saved structure. When investigating the problem I found that portage has in principle a mechanism for recovering from this condition. When I include the AttributeError in the exception handler below (and for convenience of debugging also into the file printing code in the exception handler) the operation seemingly succeeds: -----8<----- topo dirk # emerge -s smart --- Invalid atom in /etc/portage/package.keywords: app-portage/dev-python/cheetah --- Invalid atom in /etc/portage/package.keywords: cross-arm-eabi-/[latest] --- Invalid atom in /etc/portage/package.keywords: cross-arm-none-symbianelf/[stable] --- Invalid atom in /etc/portage/package.keywords: cross-arm-eabi/[latest] 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/3Q-2011.................. !!! Error loading '/var/cache/edb/vdb_metadata.pickle': 'dict' object has no attribute 'append' p### --- Invalid atom in /etc/portage/package.keywords: app-portage/dev-python/cheetah --- Invalid atom in /etc/portage/package.keywords: cross-arm-eabi-/[latest] --- Invalid atom in /etc/portage/package.keywords: cross-arm-none-symbianelf/[stable] --- Invalid atom in /etc/portage/package.keywords: cross-arm-eabi/[latest] Searching... -!!! Error loading '/var/cache/edb/vdb_metadata.pickle': 'dict' object has no attribute 'append' [ Results for search key : smart ] [ Applications found : 15 ] * app-admin/ide-smart -----8<----- The aforementioned exception handler then looks (sorry for not having a patch): -----8<----- 556 except (IOError, OSError, EOFError, ValueError, pickle.UnpicklingError, AttributeError) as e: 557 if isinstance(e, pickle.UnpicklingError) or isinstance(e, AttributeError): 558 writemsg(_unicode_decode(_("!!! Error loading '%s': %s\n")) % \ 559 (self._aux_cache_filename, e), noiselevel=-1) 560 del e -----8<----- Reproducible: Always
This is fixed in git: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=bc636fe8f9720957f29e5a07cd98531f20368ddd
This is fixed in 2.1.10.13 and 2.2.0_alpha53.