Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 417253 - emerge --sync fails - File "/usr/lib64/portage/pym/portage/cache/template.py", line 197, in validate_entry if entry[hash_key] != getattr(ebuild_hash, self.validation_chf): KeyError: '_md5_'
Summary: emerge --sync fails - File "/usr/lib64/portage/pym/portage/cache/template.py"...
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:
Whiteboard:
Keywords: InVCS, REGRESSION
Depends on:
Blocks: 409383
  Show dependency tree
 
Reported: 2012-05-23 11:27 UTC by José Romildo Malaquias
Modified: 2012-05-24 20:53 UTC (History)
0 users

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


Attachments
Output of "emerge --info" (emerge.info.txt,15.31 KB, text/plain)
2012-05-23 11:27 UTC, José Romildo Malaquias
Details

Note You need to log in before you can comment on or make changes to this bug.
Description José Romildo Malaquias 2012-05-23 11:27:33 UTC
Created attachment 312799 [details]
Output of "emerge --info"

Running "emerge --sync" today failed on my ~amd64 system:

>>> Updating Portage cache
40% [=============================>                                            ]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 1946, in emerge_main
    return action_sync(settings, trees, mtimedb, myopts, myaction)
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 2467, in action_sync
    action_metadata(settings, portdb, myopts, porttrees=[myportdir])
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 1747, in action_metadata
    ebuild_hash, tree_data.eclass_db):
  File "/usr/lib64/portage/pym/portage/cache/template.py", line 197, in validate_entry
    if entry[hash_key] != getattr(ebuild_hash, self.validation_chf):
KeyError: '_md5_'
Comment 1 Zac Medico gentoo-dev 2012-05-23 19:02:30 UTC
This error is triggered by corrupt cache, so you may want to remove the cache and sync again, like this:

  rm -rf /usr/portage/metadata/md5-cache && emerge --sync

The error is fixed in git:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=1b367f9121b7c9cdceab644539b329c501e539c2
Comment 2 José Romildo Malaquias 2012-05-24 18:32:05 UTC
I have removed the cache and synced again.

Now when I try to install any package, I am getting a sequence of errors of the kind:



# emerge -avt portage

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

Calculating dependencies -/usr/portage/eclass/libtool.eclass: line 180: syntax error near unexpected token `)'
/usr/portage/eclass/libtool.eclass: line 180: `	[[ ${do_uclibc} == "yes" ]] && elt_patches+=" ucame "*.py[co]" -o -name "*\$py.class" ")" -print0)'
 * ERROR: gnome-extra/gnome-games-3.2.1-r1 failed (depend phase):
 *   died sourcing /usr/portage/eclass/libtool.eclass in inherit()
 * 
 * Call stack:
 *                     ebuild.sh, line 541:  Called source '/usr/portage/gnome-extra/gnome-games/gnome-games-3.2.1-r1.ebuild'
 *   gnome-games-3.2.1-r1.ebuild, line  15:  Called inherit 'autotools' 'games' 'eutils' 'gnome2' 'python' 'virtualx'
 *                     ebuild.sh, line 283:  Called qa_source '/usr/portage/eclass/autotools.eclass'
 *                     ebuild.sh, line  72:  Called source '/usr/portage/eclass/autotools.eclass'
 *              autotools.eclass, line  19:  Called inherit 'libtool'
 *                     ebuild.sh, line 283:  Called die
 * The specific snippet of code:
 *   		qa_source "$location" || die "died sourcing $location in inherit()"
 * 
 * If you need support, post the output of `emerge --info '=gnome-extra/gnome-games-3.2.1-r1'`,
 * the complete build log and the output of `emerge -pqv '=gnome-extra/gnome-games-3.2.1-r1'`.
 * Working directory: '/root'
 * S: '/tmp/portage/gnome-extra/gnome-games-3.2.1-r1/work/gnome-games-3.2.1'
[...]
Comment 3 José Romildo Malaquias 2012-05-24 18:34:31 UTC
It seems the file /usr/portage/eclass/libtool.eclass is corrupted, even after syncing.
Comment 4 Zac Medico gentoo-dev 2012-05-24 18:56:00 UTC
(In reply to comment #3)
> It seems the file /usr/portage/eclass/libtool.eclass is corrupted, even
> after syncing.

Remove that file and sync again. It's normal for rsync not to notice corruption, because it only checks the timestamp and size of the file.
Comment 5 José Romildo Malaquias 2012-05-24 19:02:12 UTC
On my system the gentoo overlay is kept in an image file, which is mounted at /usr/portage.

After removing this image file and creating a new one, and recyncing, things are normal again.
Comment 6 Zac Medico gentoo-dev 2012-05-24 20:53:28 UTC
This is fixed in 2.1.10.63 and 2.2.0_alpha108.