From: Zac Medico Date: Sun, 18 May 2008 22:27:15 +0000 (-0000) Subject: Tweak vardbapi.aux_get() cache logic a bit. X-Git-Tag: v2.2_pre7~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bac9c28a169cc07e14b7d73495a2f701d50f3d2c;p=portage.git Tweak vardbapi.aux_get() cache logic a bit. svn path=/main/trunk/; revision=10360 --- 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]