From 2d531284c8b51acd63614b44ee0b611d5bf4bfb5 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 2 Mar 2010 20:51:44 +0000 Subject: [PATCH] Handle CacheCorruption from self.db_ro in _setitem, triggered by INHERITED containing non-existent eclass inside metadata.database._parse_data. Thanks to Vlastimil Babka for reporting. (trunk r15412) svn path=/main/branches/2.1.7/; revision=15634 --- pym/portage/cache/metadata_overlay.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pym/portage/cache/metadata_overlay.py b/pym/portage/cache/metadata_overlay.py index 84c5a9741..7b4f70a9c 100644 --- a/pym/portage/cache/metadata_overlay.py +++ b/pym/portage/cache/metadata_overlay.py @@ -48,7 +48,10 @@ class database(template.database): return value def _setitem(self, name, values): - value_ro = self.db_ro.get(name, None) + try: + value_ro = self.db_ro.get(name) + except CacheCorruption: + value_ro = None if value_ro is not None and \ self._are_values_identical(value_ro, values): # we have matching values in the underlying db_ro -- 2.26.2