summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/EbuildProcess.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-12-05 23:00:55 +0000
committerZac Medico <zmedico@gentoo.org>2009-12-05 23:00:55 +0000
commit879e2a33ff07dac1df442ca790ae80078c6e9631 (patch)
treebc9585999959897ba3098643711eeed976da9304 /pym/_emerge/EbuildProcess.py
parent731b3a807b3f69b6b8783459f8fb00dd2a8a179b (diff)
downloadportage-879e2a33ff07dac1df442ca790ae80078c6e9631.tar.gz
portage-879e2a33ff07dac1df442ca790ae80078c6e9631.tar.bz2
portage-879e2a33ff07dac1df442ca790ae80078c6e9631.zip
Bug #162404 - Automatically disable logging if sesandbox is enabled and a
pty is not available for some reason (currently they are never available with python3). svn path=/main/trunk/; revision=14928
Diffstat (limited to 'pym/_emerge/EbuildProcess.py')
-rw-r--r--pym/_emerge/EbuildProcess.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pym/_emerge/EbuildProcess.py b/pym/_emerge/EbuildProcess.py
index 86a63282f..a6a0b362b 100644
--- a/pym/_emerge/EbuildProcess.py
+++ b/pym/_emerge/EbuildProcess.py
@@ -24,6 +24,13 @@ class EbuildProcess(SpawnProcess):
portage._create_pty_or_pipe(copy_term_size=stdout_pipe)
return (master_fd, slave_fd)
+ def _can_log(self, slave_fd):
+ # With sesandbox, logging works through a pty but not through a
+ # normal pipe. So, disable logging if ptys are broken.
+ # See Bug #162404.
+ return not ('sesandbox' in self.settings.features \
+ and self.settings.selinux_enabled()) or os.isatty(slave_fd)
+
def _spawn(self, args, **kwargs):
root_config = self.pkg.root_config