From 978e2ea6bf2a57b4b565ce0a8bd5521d358c533b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 13 Aug 2012 20:19:28 -0700 Subject: [PATCH] Handle FEATURES=usersync. --- emerge-delta-webrsync | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/emerge-delta-webrsync b/emerge-delta-webrsync index bbc3f9e..8078f3b 100755 --- a/emerge-delta-webrsync +++ b/emerge-delta-webrsync @@ -217,7 +217,18 @@ sync_local() { echo Syncing local tree... if type -p tarsync &> /dev/null; then echo "apparently you have tarsync installed. using it." - if ! tarsync "${FILE}" "${PORTDIR}" -v -s 1 -o portage -g portage -e /distfiles -e /packages -e /local; then + local owner_opts="-o portage -g portage" + if has usersync ${FEATURES} ; then + case "${USERLAND}" in + BSD) + owner_opts=$(stat -f '-o %Su -g %Sg' "${PORTDIR}") + ;; + *) + owner_opts=$(stat -c '-o %U -g %G' "${PORTDIR}") + ;; + esac + fi + if ! tarsync "${FILE}" "${PORTDIR}" -v -s 1 ${owner_opts} -e /distfiles -e /packages -e /local; then echo "ok, tarsync failed. that's teh suck :/" exit 6 fi -- 1.7.9.7