summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-03-02 22:29:16 +0000
committerZac Medico <zmedico@gentoo.org>2010-03-02 22:29:16 +0000
commit08cc2f7d2d8646d4dd82e736719f9dcc9bc46f48 (patch)
tree47d25d885918e9905610c4c27f90ddf4c099c5bd
parent65834b621549ce049cd5e4b977a56bdbdddce382 (diff)
downloadportage-08cc2f7d2d8646d4dd82e736719f9dcc9bc46f48.tar.gz
portage-08cc2f7d2d8646d4dd82e736719f9dcc9bc46f48.tar.bz2
portage-08cc2f7d2d8646d4dd82e736719f9dcc9bc46f48.zip
Unlink log instead of truncate, to avoid leaving empty log in
$PORT_LOGDIR. This reverts bug 304981 (reporting doesn't use tee like this anymore so he'd prefer the old behavior). (trunk r15722) svn path=/main/branches/2.1.7/; revision=15725
-rw-r--r--pym/_emerge/EbuildBuildDir.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/pym/_emerge/EbuildBuildDir.py b/pym/_emerge/EbuildBuildDir.py
index 99c48dfb6..4ca0c4b1f 100644
--- a/pym/_emerge/EbuildBuildDir.py
+++ b/pym/_emerge/EbuildBuildDir.py
@@ -65,9 +65,8 @@ class EbuildBuildDir(SlotObject):
settings = self.settings
log_file = settings.get('PORTAGE_LOG_FILE')
if log_file is not None and os.path.isfile(log_file):
- # Truncate rather than unlink, so tail -f still works.
try:
- open(log_file, 'wb')
+ os.unlink(log_file)
except OSError:
pass