From: Zac Medico Date: Sat, 30 Dec 2006 03:54:36 +0000 (-0000) Subject: Be slightly more defensive when loading the vdb/blockers caches. X-Git-Tag: v2.1.2~191 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bab58cf5d43a0289d7c741b4aa62f83737798ea0;p=portage.git Be slightly more defensive when loading the vdb/blockers caches. svn path=/main/trunk/; revision=5421 --- diff --git a/bin/emerge b/bin/emerge index 17a54cbc5..6e7cb5558 100755 --- a/bin/emerge +++ b/bin/emerge @@ -844,8 +844,8 @@ class BlockerCache(DictMixin): cache_valid = self._cache_data and \ isinstance(self._cache_data, dict) and \ self._cache_data.get("version") == self._cache_version and \ - self._cache_data["virtuals"] == self._virtuals and \ - set(self._cache_data["blockers"]) == self._installed_pkgs + self._cache_data.get("virtuals") == self._virtuals and \ + set(self._cache_data.get("blockers", [])) == self._installed_pkgs if cache_valid: for pkg in self._installed_pkgs: if long(self._vardb.aux_get(pkg, ["COUNTER"])[0]) != \ diff --git a/pym/portage.py b/pym/portage.py index 642bc1570..249252bb1 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -5070,7 +5070,8 @@ class vardbapi(dbapi): pass if not self._aux_cache or \ not isinstance(self._aux_cache, dict) or \ - self._aux_cache.get("version") != self._aux_cache_version: + self._aux_cache.get("version") != self._aux_cache_version or \ + not self._aux_cache.get("packages"): self._aux_cache = {"version":self._aux_cache_version} self._aux_cache["packages"] = {} self._aux_cache["modified"] = False