Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 412865
Collapse All | Expand All

(-)a/bin/isolated-functions.sh (-2 / +6 lines)
Lines 216-223 die() { Link Here
216
		> "$PORTAGE_BUILDDIR/.die_hooks"
216
		> "$PORTAGE_BUILDDIR/.die_hooks"
217
	fi
217
	fi
218
218
219
	[[ -n ${PORTAGE_LOG_FILE} ]] \
219
	if [[ -n ${PORTAGE_LOG_FILE} ]] ; then
220
		&& eerror "The complete build log is located at '${PORTAGE_LOG_FILE}'."
220
		# Display path to symlink in ${T}, as requested in bug #412865.
221
		local log_ext=${PORTAGE_LOG_FILE##*/}
222
		log_ext=${log_ext#*.}
223
		eerror "The complete build log is located at '${T}/build.${log_ext}'."
224
	fi
221
	if [ -f "${T}/environment" ] ; then
225
	if [ -f "${T}/environment" ] ; then
222
		eerror "The ebuild environment file is located at '${T}/environment'."
226
		eerror "The ebuild environment file is located at '${T}/environment'."
223
	elif [ -d "${T}" ] ; then
227
	elif [ -d "${T}" ] ; then
(-)a/pym/portage/package/ebuild/prepare_build_dirs.py (-2 / +20 lines)
Lines 346-358 def _prepare_workdir(mysettings): Link Here
346
				writemsg(_unicode_decode("!!! %s: %s\n") %
346
				writemsg(_unicode_decode("!!! %s: %s\n") %
347
					(_("Permission Denied"), log_subdir), noiselevel=-1)
347
					(_("Permission Denied"), log_subdir), noiselevel=-1)
348
348
349
	tmpdir_log_path = os.path.join(
350
		mysettings["T"], "build.log%s" % compress_log_ext)
349
	if not logdir_subdir_ok:
351
	if not logdir_subdir_ok:
350
		# NOTE: When sesandbox is enabled, the local SELinux security policies
352
		# NOTE: When sesandbox is enabled, the local SELinux security policies
351
		# may not allow output to be piped out of the sesandbox domain. The
353
		# may not allow output to be piped out of the sesandbox domain. The
352
		# current policy will allow it to work when a pty is available, but
354
		# current policy will allow it to work when a pty is available, but
353
		# not through a normal pipe. See bug #162404.
355
		# not through a normal pipe. See bug #162404.
354
		mysettings["PORTAGE_LOG_FILE"] = os.path.join(
356
		mysettings["PORTAGE_LOG_FILE"] = tmpdir_log_path
355
			mysettings["T"], "build.log%s" % compress_log_ext)
357
	else:
358
		# Create a symlink from tmpdir_log_path to PORTAGE_LOG_FILE, as
359
		# requested in bug #412865.
360
		make_new_symlink = False
361
		try:
362
			target = os.readlink(tmpdir_log_path)
363
		except OSError:
364
			make_new_symlink = True
365
		else:
366
			if target != mysettings["PORTAGE_LOG_FILE"]:
367
				make_new_symlink = True
368
		if make_new_symlink:
369
			try:
370
				os.unlink(tmpdir_log_path)
371
			except OSError:
372
				pass
373
			os.symlink(mysettings["PORTAGE_LOG_FILE"], tmpdir_log_path)
356
374
357
def _ensure_log_subdirs(logdir, subdir):
375
def _ensure_log_subdirs(logdir, subdir):
358
	"""
376
	"""

Return to bug 412865