From f823031ed33bda9579d265b62607380bb255dfdd Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 24 Mar 2011 20:03:28 -0700 Subject: [PATCH] Preserve elog message continuity during updates. This integrates the fix from commit 8209aeab647b1ab80a64d5931069b3533776ef75 with the asynchronous merge changes from commit 7535cabdf2fab76fc55df83643157613dfd66be9. --- pym/_emerge/Binpkg.py | 2 ++ pym/_emerge/EbuildBuild.py | 2 ++ pym/portage/dbapi/vartree.py | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pym/_emerge/Binpkg.py b/pym/_emerge/Binpkg.py index 62d44c48f..fbd2a53ac 100644 --- a/pym/_emerge/Binpkg.py +++ b/pym/_emerge/Binpkg.py @@ -304,6 +304,8 @@ class Binpkg(CompositeTask): def _unlock_builddir(self): if self.opts.pretend or self.opts.fetchonly: return + portage.elog.elog_process(self.pkg.cpv, self.settings, + phasefilter=("prerm", "postrm")) portage.elog.elog_process(self.pkg.cpv, self.settings) self._build_dir.unlock() diff --git a/pym/_emerge/EbuildBuild.py b/pym/_emerge/EbuildBuild.py index c7a5f5cdb..b72b3d55e 100644 --- a/pym/_emerge/EbuildBuild.py +++ b/pym/_emerge/EbuildBuild.py @@ -243,6 +243,8 @@ class EbuildBuild(CompositeTask): self.wait() def _unlock_builddir(self): + portage.elog.elog_process(self.pkg.cpv, self.settings, + phasefilter=("prerm", "postrm")) portage.elog.elog_process(self.pkg.cpv, self.settings) self._build_dir.unlock() diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 66e2955a6..a8888ae95 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -1668,7 +1668,7 @@ class dblink(object): self._eerror(ebuild_phase, msg_lines) - self._elog_process() + self._elog_process(phasefilter=("prerm", "postrm")) if retval == os.EX_OK: # myebuildpath might be None, so ensure @@ -2784,10 +2784,10 @@ class dblink(object): self._scheduler.dblinkElog(self, phase, _eerror, lines) - def _elog_process(self): + def _elog_process(self, phasefilter=None): cpv = self.mycpv if self._pipe is None: - elog_process(cpv, self.settings) + elog_process(cpv, self.settings, phasefilter=phasefilter) else: logdir = os.path.join(self.settings["T"], "logging") ebuild_logentries = collect_ebuild_messages(logdir) -- 2.26.2