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

(-)portage-2.3.5/bin/phase-functions.sh.back (+13 lines)
Lines 562-567 Link Here
562
	fi
562
	fi
563
	rm -rf "${D}"
563
	rm -rf "${D}"
564
	mkdir -p "${_x}"
564
	mkdir -p "${_x}"
565
	# BSD by default inherits directory group id from parent directory
566
	# It's also possible to have such behaviour on Linux by
567
	# mounting with option grpid or bsdgroups on some Linux filesystems
568
	# This may result in wrong group owning files with some features enabled,
569
	# for example with userpriv feature it may lead to portage group owning files
570
	# To fix this, explicitely set uid and gid of image root
571
	_user="$(getent passwd "${PORTAGE_INST_UID}" | sed -e 's/:.*//')"
572
	_group="$(getent group "${PORTAGE_INST_GID}" | sed -e 's/:.*//')"
573
	if [ -n "${_user}" -o -n "${_group}" ] ; then
574
		chown "${_user}":"${_group}" "${_x}"
575
	fi
576
	unset _user
577
	unset _group
565
	unset _x
578
	unset _x
566
579
567
	if [[ -d $S ]] ; then
580
	if [[ -d $S ]] ; then

Return to bug 615212