egencache: add _mtime_ to metadata
authorZac Medico <zmedico@gentoo.org>
Sat, 15 Oct 2011 23:10:18 +0000 (16:10 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 15 Oct 2011 23:10:18 +0000 (16:10 -0700)
This fixes a regression in FEATURES=parse-eapi-ebuild-head support
for egencache since commit 2ed1cb53cc4158af08c22d466b15b9a9a7767212.
If the metadata does not contain _mtime_ here, then _setitem from
cache.metadata.database will raise KeyError.

bin/egencache

index 8d16cd693d84b89bbb74b4969d01c20d0c2955f8..22fb1d5e1143ff54e0bc963ec4921f9f9c8feb5a 100755 (executable)
@@ -237,8 +237,7 @@ class GenCache(object):
                                del metadata['EAPI']
                        try:
                                chf = self._trg_cache.validation_chf
-                               if chf != 'mtime':
-                                       metadata['_%s_' % chf] = getattr(ebuild_hash, chf)
+                               metadata['_%s_' % chf] = getattr(ebuild_hash, chf)
                                try:
                                        self._trg_cache[cpv] = metadata
                                except StatCollision as sc: