commit: bb2f061345fa487061e90922707aab2ddb4b1687
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 23 22:57:23 2016 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jul 23 22:57:23 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=bb2f0613
action_metadata: handle missing _md5_ key (bug 568934)
Since commit 9abbda7d054761ae6c333d3e6d420632b9658b6d, 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: 9abbda7d0547 ("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
pym/portage/metadata.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pym/portage/metadata.py b/pym/portage/metadata.py
index 017a838..1abec5a 100644
--- a/pym/portage/metadata.py
+++ b/pym/portage/metadata.py
@@ -149,7 +149,7 @@ def action_metadata(settings, portdb, myopts,
porttrees=None):
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 \