From: Zac Medico Date: Thu, 8 Dec 2011 19:51:06 +0000 (-0800) Subject: etc-update: use PORTAGE_INST_UID/GID X-Git-Tag: v2.2.0_alpha80~52 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b79dd09c523764f95be882fe1a5afde71cbab81c;p=portage.git etc-update: use PORTAGE_INST_UID/GID --- diff --git a/bin/etc-update b/bin/etc-update index 5a7ba2a60..731b6484e 100755 --- a/bin/etc-update +++ b/bin/etc-update @@ -537,7 +537,8 @@ ${SET_X} && set -x type portageq > /dev/null || exit $? eval $(portageq envvar -v CONFIG_PROTECT \ - CONFIG_PROTECT_MASK PORTAGE_CONFIGROOT PORTAGE_TMPDIR EROOT USERLAND) + CONFIG_PROTECT_MASK PORTAGE_CONFIGROOT PORTAGE_INST_GID PORTAGE_INST_UID \ + PORTAGE_TMPDIR EROOT USERLAND) export PORTAGE_TMPDIR TMP="${PORTAGE_TMPDIR}/etc-update-$$" @@ -554,7 +555,8 @@ rm -rf "${TMP}" 2> /dev/null mkdir "${TMP}" || die "failed to create temp dir" 1 # make sure we have a secure directory to work in chmod 0700 "${TMP}" || die "failed to set perms on temp dir" 1 -chown ${UID:-0}:${GID:-0} "${TMP}" || die "failed to set ownership on temp dir" 1 +chown ${PORTAGE_INST_UID:-0}:${PORTAGE_INST_GID:-0} "${TMP}" || \ + die "failed to set ownership on temp dir" 1 # I need the CONFIG_PROTECT value #CONFIG_PROTECT=$(/usr/lib/portage/bin/portageq envvar CONFIG_PROTECT)