From 228a860476d7543608b469c569ec1d4e70aa7f59 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 7 Nov 2012 08:48:40 -0800 Subject: [PATCH] emerge-webrsync: rsync -o -g, bug #442190 This fixes a regression since the -a option was removed in commit e672b5ccbbbe38eda5c733fc799a20d92a8bdf75. --- bin/emerge-webrsync | 7 +++++-- misc/emerge-delta-webrsync | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) 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 -- 2.26.2