Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 709422 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/php.eselect.in.in (-13 / +10 lines)
Lines 85-91 sapi_active_link_target_dir() { Link Here
85
	local sapi="${1}"
85
	local sapi="${1}"
86
	local target="${2}"
86
	local target="${2}"
87
87
88
	local link_target_dir="@LIBDIR@/${target}/bin"
88
	local link_target_dir="${ROOT%/}@LIBDIR@/${target}/bin"
89
	if [[ "${sapi}" == "apache2" ]] ; then
89
	if [[ "${sapi}" == "apache2" ]] ; then
90
		link_target_dir+="/../apache2"
90
		link_target_dir+="/../apache2"
91
	fi
91
	fi
Lines 459-467 set_sapi() { Link Here
459
	for link_name in $(sapi_active_link_names "${sapi}"); do
459
	for link_name in $(sapi_active_link_names "${sapi}"); do
460
		local link_target=$(sapi_link_name_target "${sapi}" "${target_name}" "${link_name}")
460
		local link_target=$(sapi_link_name_target "${sapi}" "${target_name}" "${link_name}")
461
461
462
		# We need these links to be relative: when setting a target
463
		# with ROOT nonempty, the symlink needs to point within
464
		# ROOT. But if you later chroot() into ROOT, that link will
465
		# point... nowhere, most likely. We need it to still point
466
		# at the right target in that case!
467
		local relative_target=$(relative_name \
468
									"${link_tgt_dir}/${link_target}" \
469
									"${link_dir}" )
462
		# Use the short "-f" option for POSIX compatibility.
470
		# Use the short "-f" option for POSIX compatibility.
463
		@LN_S@ -f "${link_tgt_dir}/${link_target}" \
471
		@LN_S@ -f "${relative_target}" "${link_dir}/${link_name}" || \
464
			"${link_dir}/${link_name}" || \
465
			die -q "failed to create active ${link_name} symlink"
472
			die -q "failed to create active ${link_name} symlink"
466
	done
473
	done
467
474
Lines 518-528 describe_list_options() { Link Here
518
}
525
}
519
526
520
do_list() {
527
do_list() {
521
	if [ "${ROOT%/}" != "" ] ; then
522
		local msg
523
		write_warning_msg "ROOT only supported in setting the configuration"
524
		echo
525
	fi
526
	local sapi="${1}"
528
	local sapi="${1}"
527
	check_module "${sapi}"
529
	check_module "${sapi}"
528
	list_sapi "${sapi}"
530
	list_sapi "${sapi}"
Lines 543-553 describe_show_options() { Link Here
543
}
545
}
544
546
545
do_show() {
547
do_show() {
546
	if [ "${ROOT%/}" != "" ] ; then
547
		local msg
548
		write_warning_msg "ROOT only supported in setting the configuration"
549
		echo
550
	fi
551
	local sapi="${1}"
548
	local sapi="${1}"
552
	check_module "${sapi}"
549
	check_module "${sapi}"
553
	get_sapi_active_target "${sapi}"
550
	get_sapi_active_target "${sapi}"

Return to bug 709422