From 96a04fcef7c3ee2ac878cb3e8dfc7742383fde92 Mon Sep 17 00:00:00 2001 From: Marius Mauch Date: Mon, 19 Jun 2006 18:15:56 +0000 Subject: [PATCH] make sure that elog entries are also processed in *rm phases and that they are only processed once svn path=/main/trunk/; revision=3539 --- pym/portage.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pym/portage.py b/pym/portage.py index d7fb000d0..3ebe81b77 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -462,6 +462,13 @@ def elog_process(cpv, mysettings): except portage_exception.PortageException, e: print e + # clean logfiles to avoid repetitions + for f in mylogfiles: + try: + os.unlink(os.path.join(mysettings["T"], "logging", f)) + except OSError: + pass + #parse /etc/env.d and generate /etc/profile.env def env_update(makelinks=1, target_root=None, prev_mtimes=None): @@ -6104,6 +6111,10 @@ class dblink: a = doebuild(myebuildpath, "postrm", self.myroot, self.settings, use_cache=0, tree="vartree", mydbapi=self.vartree.dbapi, vartree=self.vartree) + + # process logs created during pre/postrm + elog_process(self.mycpv, self.settings) + # XXX: Decide how to handle failures here. if a != 0: writemsg("!!! FAILED postrm: "+str(a)+"\n", noiselevel=-1) -- 2.26.2