summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-08-07 09:08:31 +0000
committerZac Medico <zmedico@gentoo.org>2008-08-07 09:08:31 +0000
commit3266963ed0bff7c1d65d9636786b8f03f828c9c9 (patch)
tree7477a8be4984005abf312b8b345a11dd7bd1e2c6
parentc054a61d345bc8db38c4aea596e9ae12ec1f4643 (diff)
downloadportage-3266963ed0bff7c1d65d9636786b8f03f828c9c9.tar.gz
portage-3266963ed0bff7c1d65d9636786b8f03f828c9c9.tar.bz2
portage-3266963ed0bff7c1d65d9636786b8f03f828c9c9.zip
In order to conserve some space, make _setitem() skip writing keys for which
the value is empty. svn path=/main/trunk/; revision=11340
-rw-r--r--pym/portage/cache/flat_hash.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pym/portage/cache/flat_hash.py b/pym/portage/cache/flat_hash.py
index 80b23fe4d..ed1eebd12 100644
--- a/pym/portage/cache/flat_hash.py
+++ b/pym/portage/cache/flat_hash.py
@@ -72,6 +72,8 @@ class database(fs_template.FsBased):
raise cache_errors.CacheCorruption(cpv, e)
for k, v in values.iteritems():
+ if not v:
+ continue
if k != "_mtime_" and (k == "_eclasses_" or k in self._known_keys):
myf.write("%s=%s\n" % (k, v))