diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-05-02 02:56:45 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-05-02 02:56:45 +0000 |
commit | 40fe38a1470bb81e5f828e0cf55a9f995dd0cc77 (patch) | |
tree | cabb81eb2d5a17a072110241823ff3487f6f4e73 | |
parent | 43d6b99d539af8da7cb786b9a6d13911ccff8659 (diff) | |
download | portage-40fe38a1470bb81e5f828e0cf55a9f995dd0cc77.tar.gz portage-40fe38a1470bb81e5f828e0cf55a9f995dd0cc77.tar.bz2 portage-40fe38a1470bb81e5f828e0cf55a9f995dd0cc77.zip |
Skip group/owner tarsync options for tarsync if chown on /usr/portage
fails, since the user might still be able to sync even though the
chown call is not permitted.
svn path=/main/trunk/; revision=10070
-rwxr-xr-x | bin/emerge-webrsync | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync index ae4dfff35..24733840b 100755 --- a/bin/emerge-webrsync +++ b/bin/emerge-webrsync @@ -174,7 +174,10 @@ sync_local() { vecho "Syncing local tree ..." if type -P tarsync > /dev/null ; then - if ! tarsync $(vvecho -v) -s 1 -o portage -g portage -e /distfiles -e /packages -e /local "${file}" "${PORTDIR}"; then + local chown_opts="-o portage -g portage" + chown portage:portage portage > /dev/null 2>&1 || chown_opts="" + if ! tarsync $(vvecho -v) -s 1 ${chown_opts} \ + -e /distfiles -e /packages -e /local "${file}" "${PORTDIR}"; then eecho "tarsync failed; tarball is corrupt? (${file})" return 1 fi |