Skip to content

Commit

Permalink
action_metadata: handle missing _md5_ key (bug 568934)
Browse files Browse the repository at this point in the history
Since commit 9abbda7, users with
FEATURES=metadata-transfer enabled would receive a KeyError when
an existing cache entry contained _mtime_ instead of _md5_. Fix
it to simply overwrite the cache entry in this case.

Fixes: 9abbda7 ("portage.cache: write md5 instead of mtime (bug 568934)")
X-Gentoo-Bug: 568934
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=568934
  • Loading branch information
zmedico committed Jul 23, 2016
1 parent 55aef9b commit bb2f061
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pym/portage/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def sigwinch_handler(signum, frame):
src[dest_chf_key] = dest_chf_getter(ebuild_hash)

if dest is not None:
if not (dest[dest_chf_key] == src[dest_chf_key] and \
if not (dest.get(dest_chf_key) == src[dest_chf_key] and \
tree_data.eclass_db.validate_and_rewrite_cache(
dest['_eclasses_'], tree_data.dest_db.validation_chf,
tree_data.dest_db.store_eclass_paths) is not None and \
Expand Down

0 comments on commit bb2f061

Please sign in to comment.