MergeProcess: populate vardbapi cache for new pkg
authorZac Medico <zmedico@gentoo.org>
Fri, 27 May 2011 02:38:00 +0000 (19:38 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 27 May 2011 02:38:00 +0000 (19:38 -0700)
pym/portage/dbapi/_MergeProcess.py

index 43bec72947e52e9c7f51c705b18f53ee2fdb02bb..b52c158689a0778319b9dc7ca455006c86bb9e53 100644 (file)
@@ -254,6 +254,15 @@ class MergeProcess(SpawnProcess):
                """
                Unregister from the scheduler and close open files.
                """
+
+               if not self.unmerge:
+                       # Populate the vardbapi cache for the new package
+                       # while its inodes are still hot.
+                       try:
+                               self.vartree.dbapi.aux_get(self.settings.mycpv, ["EAPI"])
+                       except KeyError:
+                               pass
+
                self._unlock_vdb()
                if self._elog_reg_id is not None:
                        self.scheduler.unregister(self._elog_reg_id)