emerge --metadata/regen: flush portdbapi cache
authorZac Medico <zmedico@gentoo.org>
Sat, 8 Jun 2013 11:47:01 +0000 (04:47 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 8 Jun 2013 11:47:01 +0000 (04:47 -0700)
pym/_emerge/MetadataRegen.py
pym/_emerge/actions.py

index bdf2fa7eaf3f24377cb4bfbb263a3b04c3c46d97..d92b6a06e6461325bc0aa86a1fd0d5d3c98ace73 100644 (file)
@@ -86,6 +86,7 @@ class MetadataRegen(AsyncScheduler):
 
                self._termination_check()
                if self._terminated_tasks:
+                       portdb.flush_cache()
                        self.returncode = self._cancelled_returncode
                        return self.returncode
 
@@ -130,6 +131,7 @@ class MetadataRegen(AsyncScheduler):
                                        except (KeyError, CacheError):
                                                pass
 
+               portdb.flush_cache()
                return self.returncode
 
        def _task_exit(self, metadata_process):
index d6e810084bd18ea3a1b68a612c40744e22afd5e8..1629d92806fe792d300f6b039e713c53dc2db483 100644 (file)
@@ -1968,6 +1968,7 @@ def action_metadata(settings, portdb, myopts, porttrees=None):
                print()
                signal.signal(signal.SIGWINCH, signal.SIG_DFL)
 
+       portdb.flush_cache()
        sys.stdout.flush()
        os.umask(old_umask)