Handle a KeyError when validating the blocker cache. (trunk r10045)
authorZac Medico <zmedico@gentoo.org>
Wed, 30 Apr 2008 09:00:46 +0000 (09:00 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 30 Apr 2008 09:00:46 +0000 (09:00 -0000)
svn path=/main/branches/2.1.2/; revision=10046

bin/emerge

index 7ece9a8f58d45d25b19ba916920671f892a4c2de..d942750de020d4671fece2656f7d7304a2a4f537 100755 (executable)
@@ -1546,7 +1546,12 @@ class BlockerCache(DictMixin):
                                        invalid_cache.add(cpv)
                                        continue
                                counter, atoms = value
-                               if counter != long(self._vardb.aux_get(cpv, ["COUNTER"])[0]):
+                               try:
+                                       if counter != long(self._vardb.aux_get(cpv, ["COUNTER"])[0]):
+                                               invalid_cache.add(cpv)
+                                               continue
+                               except KeyError:
+                                       # The package is no longer installed.
                                        invalid_cache.add(cpv)
                                        continue
                        for cpv in invalid_cache: