diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-12-06 11:00:34 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-12-06 11:00:34 +0000 |
commit | 33bd7f8e97f165fb2f1e4ff93e2ababbe7c51679 (patch) | |
tree | 5c8228fa2d65d5c91d24c0e5193fbadb9868176b /pym/_emerge/EbuildProcess.py | |
parent | 684427f2fd0fe54b5515b470384156adf52921aa (diff) | |
download | portage-33bd7f8e97f165fb2f1e4ff93e2ababbe7c51679.tar.gz portage-33bd7f8e97f165fb2f1e4ff93e2ababbe7c51679.tar.bz2 portage-33bd7f8e97f165fb2f1e4ff93e2ababbe7c51679.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). (trunk r14928)
svn path=/main/branches/2.1.7/; revision=14942
Diffstat (limited to 'pym/_emerge/EbuildProcess.py')
-rw-r--r-- | pym/_emerge/EbuildProcess.py | 7 |
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 |