action_metadata: use auxdbkeys to compare entries
authorZac Medico <zmedico@gentoo.org>
Sat, 29 Oct 2011 20:55:07 +0000 (13:55 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 29 Oct 2011 20:55:07 +0000 (13:55 -0700)
This borrows the approach that egencache uses since commit
0e120da008c9d0d41c9372c81145c6e153028a6d.

pym/_emerge/actions.py

index 610a6c464dd9abada88e79891d79abb626e121ce..6ccf894d10d0d68c560b266edaa588f7ab1b9284 100644 (file)
@@ -1779,13 +1779,7 @@ def action_metadata(settings, portdb, myopts, porttrees=None):
                                                # We don't want to skip the write unless we're really
                                                # sure that the existing cache is identical, so don't
                                                # trust _mtime_ and _eclasses_ alone.
-                                               keys = set()
-                                               keys.update(src)
-                                               keys.update(dest)
-                                               keys.discard('_eclasses_')
-                                               keys.discard('_mtime_')
-                                               keys.discard(src_chf_key)
-                                               for k in keys:
+                                               for k in auxdbkeys:
                                                        if dest.get(k, '') != src.get(k, ''):
                                                                dest = None
                                                                break