summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-07-17 10:57:38 +0000
committerZac Medico <zmedico@gentoo.org>2008-07-17 10:57:38 +0000
commit261fb5c354b0e2f5fada2132499686de3d69eb6c (patch)
treea26e81bf85ca847a9bf9bb62357c3c6d8585d0bf /pym
parent2fba213baa36179a0c677fb913aba593debfbe2a (diff)
downloadportage-261fb5c354b0e2f5fada2132499686de3d69eb6c.tar.gz
portage-261fb5c354b0e2f5fada2132499686de3d69eb6c.tar.bz2
portage-261fb5c354b0e2f5fada2132499686de3d69eb6c.zip
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
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/dbapi/vartree.py7
1 files changed, 6 insertions, 1 deletions
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(),