From: Brian Harring Date: Thu, 2 Feb 2006 12:58:20 +0000 (-0000) Subject: optional tarsync integration; thanks to Johannes Fahrenkrug for doing the legwork. X-Git-Tag: v2.1_pre5_2760~112 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f20801229de80aba3686ed4b1683da5ae9bf8bf3;p=portage.git optional tarsync integration; thanks to Johannes Fahrenkrug for doing the legwork. svn path=/main/trunk/; revision=2624 --- diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync index f68d0265b..2173ecd95 100755 --- a/bin/emerge-webrsync +++ b/bin/emerge-webrsync @@ -51,21 +51,29 @@ fi sync_local() { echo Syncing local tree... - if ! tar jxf $FILE; then - echo "Tar failed to extract the image. Please review the output." - echo "Executed command: tar jxf $FILE" - exit 1 + if type -p tarsync &> /dev/null; then + if ! tarsync "${FILE}" "${PORTDIR}" -v -s 1 -o root -g root -e /distfiles -e /packages -e /local; then + echo "tarsync failed; tarball is corrupt?" + exit 1; + fi + rm "${FILE}" + else + if ! tar jxf $FILE; then + echo "Tar failed to extract the image. Please review the output." + echo "Executed command: tar jxf $FILE" + exit 1 + fi + rm -f $FILE + # Make sure user and group file ownership is root + chown -R 0:0 portage + cd portage + rsync -av --progress --stats --delete --delete-after \ + --exclude='/distfiles' --exclude='/packages' \ + --exclude='/local' . ${PORTDIR%%/} + cd .. + echo "cleaning up" + rm -rf portage fi - rm -f $FILE - # Make sure user and group file ownership is root - chown -R 0:0 portage - cd portage - rsync -av --progress --stats --delete --delete-after \ - --exclude='/distfiles' --exclude='/packages' \ - --exclude='/local' . ${PORTDIR%%/} - cd .. - echo "cleaning up" - rm -rf portage echo "transferring metadata/cache" emerge metadata }