From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SXGnC-0001qV-Uv for garchives@archives.gentoo.org; Wed, 23 May 2012 19:00:19 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 095DCE0665; Wed, 23 May 2012 19:00:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id D2148E0665 for ; Wed, 23 May 2012 19:00:11 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0E9731B4028 for ; Wed, 23 May 2012 19:00:07 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id DD3C8E542A for ; Wed, 23 May 2012 19:00:04 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1337799585.1b367f9121b7c9cdceab644539b329c501e539c2.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/cache/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/cache/template.py X-VCS-Directories: pym/portage/cache/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 1b367f9121b7c9cdceab644539b329c501e539c2 X-VCS-Branch: master Date: Wed, 23 May 2012 19:00:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 263cc7b8-42ce-4f13-8aea-9ecb56832093 X-Archives-Hash: 7bca62d3b32b711d1e7dd30224df7c1c commit: 1b367f9121b7c9cdceab644539b329c501e539c2 Author: Zac Medico gentoo org> AuthorDate: Wed May 23 18:59:45 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Wed May 23 18:59:45 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D1b367f91 validate_entry: handle KeyError for bug #417253 This error is triggered by corrupt cache entries. --- pym/portage/cache/template.py | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/pym/portage/cache/template.py b/pym/portage/cache/template.p= y index 0af6c20..0ab6e0a 100644 --- a/pym/portage/cache/template.py +++ b/pym/portage/cache/template.py @@ -194,8 +194,13 @@ class database(object): =20 def validate_entry(self, entry, ebuild_hash, eclass_db): hash_key =3D '_%s_' % self.validation_chf - if entry[hash_key] !=3D getattr(ebuild_hash, self.validation_chf): + try: + entry_hash =3D entry[hash_key] + except KeyError: return False + else: + if entry_hash !=3D getattr(ebuild_hash, self.validation_chf): + return False update =3D eclass_db.validate_and_rewrite_cache(entry['_eclasses_'], s= elf.validation_chf, self.store_eclass_paths) if update is None: