From: Zac Medico Date: Wed, 7 Nov 2012 16:48:40 +0000 (-0800) Subject: emerge-webrsync: rsync -o -g, bug #442190 X-Git-Tag: v2.2.0_alpha143~45 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=228a860476d7543608b469c569ec1d4e70aa7f59;p=portage.git emerge-webrsync: rsync -o -g, bug #442190 This fixes a regression since the -a option was removed in commit e672b5ccbbbe38eda5c733fc799a20d92a8bdf75. --- diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync index 09b75746c..e826ec440 100755 --- a/bin/emerge-webrsync +++ b/bin/emerge-webrsync @@ -221,10 +221,13 @@ sync_local() { # Free disk space ${keep} || rm -f "${file}" - chown ${ownership} portage > /dev/null 2>&1 && \ + local rsync_opts="${PORTAGE_RSYNC_OPTS} ${PORTAGE_RSYNC_EXTRA_OPTS}" + if chown ${ownership} portage > /dev/null 2>&1; then chown -R ${ownership} portage + rsync_opts+=" --owner --group" + fi cd portage - rsync ${PORTAGE_RSYNC_OPTS} ${PORTAGE_RSYNC_EXTRA_OPTS} . "${PORTDIR%%/}" + rsync ${rsync_opts} . "${PORTDIR%%/}" cd .. __vecho "Cleaning up ..." diff --git a/misc/emerge-delta-webrsync b/misc/emerge-delta-webrsync index 9dd2a6281..a782be71d 100755 --- a/misc/emerge-delta-webrsync +++ b/misc/emerge-delta-webrsync @@ -302,11 +302,14 @@ sync_local() { echo "Executed command: tar jxf $FILE" exit 1 fi - # Make sure user and group file ownership is appropriate - chown ${ownership} portage > /dev/null 2>&1 && \ + + local rsync_opts="${PORTAGE_RSYNC_OPTS} ${PORTAGE_RSYNC_EXTRA_OPTS}" + if chown ${ownership} portage > /dev/null 2>&1; then chown -R ${ownership} portage + rsync_opts+=" --owner --group" + fi cd portage - rsync ${PORTAGE_RSYNC_OPTS} ${PORTAGE_RSYNC_EXTRA_OPTS} . "${PORTDIR%%/}" + rsync ${rsync_opts} . "${PORTDIR%%/}" cd .. echo "cleaning up" rm -rf portage