From: Zac Medico Date: Wed, 21 Jun 2006 03:15:05 +0000 (-0000) Subject: Make sure that elog entries are also processed in *rm phases and that they are only... X-Git-Tag: v2.1-r1~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5f207275a5867d19a98dcef4c5f7ca41c3413c5a;p=portage.git Make sure that elog entries are also processed in *rm phases and that they are only processed once. This patch is from trunk r3539. svn path=/main/branches/2.1/; revision=3576 --- diff --git a/pym/portage.py b/pym/portage.py index 0abfb8799..dad2583bc 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -508,6 +508,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): @@ -6145,6 +6152,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)