From: Zac Medico Date: Thu, 17 Jul 2008 10:57:38 +0000 (-0000) Subject: Handle the case in dblink.unmerge() when the log file is a temp file and so X-Git-Tag: v2.2_rc2~64 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=261fb5c354b0e2f5fada2132499686de3d69eb6c;p=portage.git Handle the case in dblink.unmerge() when the log file is a temp file and so it doesn't exist after postrm cleaning. svn path=/main/trunk/; revision=11100 --- diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index deea8539b..32d83e25a 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -1739,10 +1739,15 @@ class dblink(object): del e unlockdir(catdir_lock) - if log_path is not None: + if log_path is not None and os.path.exists(log_path): # Restore this since it gets lost somewhere above and it # needs to be set for _display_merge() to be able to log. + # Note that the log isn't necessarily supposed to exist + # since if PORT_LOGDIR is unset then it's a temp file + # so it gets cleaned above. self.settings["PORTAGE_LOG_FILE"] = log_path + else: + self.settings.pop("PORTAGE_LOG_FILE", None) env_update(target_root=self.myroot, prev_mtimes=ldpath_mtimes, contents=contents, env=self.settings.environ(),