summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-05-02 02:57:45 +0000
committerZac Medico <zmedico@gentoo.org>2008-05-02 02:57:45 +0000
commitb1d257ea81bd05ff61d5e260133bb7407538b7d9 (patch)
treeb99a7c479428c8999760307d7260740ffc5cf402 /bin
parentd7ce2d7ebfe7b7e2c2c97aa15d15547acf5f28a3 (diff)
downloadportage-b1d257ea81bd05ff61d5e260133bb7407538b7d9.tar.gz
portage-b1d257ea81bd05ff61d5e260133bb7407538b7d9.tar.bz2
portage-b1d257ea81bd05ff61d5e260133bb7407538b7d9.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. (trunk r10070) svn path=/main/branches/2.1.2/; revision=10071
Diffstat (limited to 'bin')
-rwxr-xr-xbin/emerge-webrsync5
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