summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-03-17 22:57:26 +0000
committerZac Medico <zmedico@gentoo.org>2006-03-17 22:57:26 +0000
commit2f972b8cd7fdc75f952e2ab51a94bfe808fc9e8b (patch)
tree9d190fc91b5f68c2b1a3abc90e705ac919a1cb8d
parent9d0f054967db70af58a43ab4e359a6137ecf47ce (diff)
downloadportage-2f972b8cd7fdc75f952e2ab51a94bfe808fc9e8b.tar.gz
portage-2f972b8cd7fdc75f952e2ab51a94bfe808fc9e8b.tar.bz2
portage-2f972b8cd7fdc75f952e2ab51a94bfe808fc9e8b.zip
Merge emerge-webrsync uid and gid fixes from the prefix branch.
svn path=/main/trunk/; revision=2923
-rwxr-xr-xbin/emerge-webrsync9
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index ec4e59231..0e6867341 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -17,7 +17,8 @@ PORTDIR="$(/usr/lib/portage/bin/portageq portdir)"
FETCHCOMMAND="$(/usr/lib/portage/bin/portageq envvar FETCHCOMMAND)"
USERLAND="$(/usr/lib/portage/bin/portageq envvar USERLAND)"
DISTDIR="$(/usr/lib/portage/bin/portageq envvar PORTAGE_TMPDIR)/emerge-webrsync"
-
+PORTAGE_INST_UID="$(/usr/lib/portage/bin/portageq envvar PORTAGE_INST_UID)"
+PORTAGE_INST_GID="$(/usr/lib/portage/bin/portageq envvar PORTAGE_INST_GID)"
if [ ! -d $DISTDIR ] ; then
mkdir -p $DISTDIR
fi
@@ -50,7 +51,7 @@ fi
sync_local() {
echo Syncing local tree...
if type -p tarsync &> /dev/null; then
- if ! tarsync "${FILE}" "${PORTDIR}" -v -s 1 -o root -g root -e /distfiles -e /packages -e /local; then
+ if ! tarsync "${FILE}" "${PORTDIR}" -v -s 1 -o ${PORTAGE_INST_UID} -g ${PORTAGE_INST_GID} -e /distfiles -e /packages -e /local; then
echo "tarsync failed; tarball is corrupt?"
exit 1;
fi
@@ -62,8 +63,8 @@ sync_local() {
exit 1
fi
rm -f $FILE
- # Make sure user and group file ownership is root
- chown -R 0:0 portage
+ # Make sure user and group file ownership is ${PORTAGE_INST_UID}:${PORTAGE_INST_GID}
+ chown -R ${PORTAGE_INST_UID}:${PORTAGE_INST_GID} portage
cd portage
rsync -av --progress --stats --delete --delete-after \
--exclude='/distfiles' --exclude='/packages' \