summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/dbapi/vartree.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 8506a23e4..041c60a16 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -615,6 +615,8 @@ class vardbapi(dbapi):
mydata = {}
cache_valid = False
cache_incomplete = False
+ cache_mtime = None
+ metadata = None
if pkg_data:
cache_mtime, metadata = pkg_data
cache_valid = cache_mtime == mydir_mtime
@@ -638,7 +640,7 @@ class vardbapi(dbapi):
mydata[k] = v
if not cache_valid or cache_incomplete:
cache_data = {}
- if cache_incomplete:
+ if cache_valid and metadata:
cache_data.update(metadata)
for aux_key in cache_these:
cache_data[aux_key] = mydata[aux_key]