For bug #162404, when sesandbox is enabled, only log if PORT_LOGDIR is explicitly...
authorZac Medico <zmedico@gentoo.org>
Fri, 19 Jan 2007 01:16:36 +0000 (01:16 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 19 Jan 2007 01:16:36 +0000 (01:16 -0000)
svn path=/main/trunk/; revision=5718

pym/portage.py

index 69f63621484522a63c562c10c2c8204f0305a347..e1b0f74456f5e2cbfb41e43a1db7b3cb8c0ff4cb 100644 (file)
@@ -3228,7 +3228,13 @@ def prepare_build_dirs(myroot, mysettings, cleanup):
                        (mysettings["CATEGORY"], mysettings["PF"], logid_time))
                del logid_path, logid_time
        else:
-               mysettings["PORTAGE_LOG_FILE"] = os.path.join(mysettings["T"], "build.log")
+               # When sesandbox is enabled, only log if PORT_LOGDIR is explicitly
+               # enabled since it is possible that local SELinux security policies
+               # do not allow ouput to be piped out of the sesandbox domain.
+               if not (mysettings.selinux_enabled() and \
+                       "sesandbox" in mysettings.features):
+                       mysettings["PORTAGE_LOG_FILE"] = os.path.join(
+                               mysettings["T"], "build.log")
 
 _doebuild_manifest_exempt_depend = 0
 _doebuild_manifest_checked = None