commit: 92f4b283c86a74c99fcfa98f8baccaf1b0603dc8 Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Mon Dec 9 09:12:11 2019 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Mon Dec 9 09:14:05 2019 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=92f4b283
emerge-webrsync: handle gentoo-YYYYMMDD directory name Bug: https://bugs.gentoo.org/693454 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> bin/emerge-webrsync | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync index 25daaf8eb..2190ad20b 100755 --- a/bin/emerge-webrsync +++ b/bin/emerge-webrsync @@ -239,7 +239,7 @@ check_file_signature() { get_snapshot_timestamp() { local file="$1" - do_tar "${file}" --to-stdout -xf - portage/metadata/timestamp.x | cut -f 1 -d " " + do_tar "${file}" --to-stdout -f - --wildcards -x '*/metadata/timestamp.x' | cut -f 1 -d " " } sync_local() { @@ -268,9 +268,8 @@ sync_local() { return 1 fi else - if ! do_tar "${file}" xf -; then + if ! do_tar "${file}" -x --strip-components=1 -f -; then eecho "tar failed to extract the image. tarball is corrupt? (${file})" - rm -fr portage return 1 fi @@ -278,16 +277,13 @@ sync_local() { ${keep} || rm -f "${file}" local rsync_opts="${PORTAGE_RSYNC_OPTS} ${PORTAGE_RSYNC_EXTRA_OPTS}" - if chown ${ownership} portage > /dev/null 2>&1; then - chown -R ${ownership} portage + if chown ${ownership} . > /dev/null 2>&1; then + chown -R ${ownership} . rsync_opts+=" --owner --group" fi - cd portage rsync ${rsync_opts} . "${repo_location%%/}" - cd .. __vecho "Cleaning up ..." - rm -fr portage fi if has metadata-transfer ${FEATURES} ; then
