From: Zac Medico Date: Sat, 20 Feb 2010 21:10:47 +0000 (-0000) Subject: Handle CacheCorruption from self.db_ro in _setitem, triggered by INHERITED X-Git-Tag: v2.2_rc64~87 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=67e7d29b6e7867ff8b23f4bb43370f27a3cf942b;p=portage.git 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. svn path=/main/trunk/; revision=15412 --- 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