aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2019-12-09 01:26:55 -0800
committerZac Medico <zmedico@gentoo.org>2019-12-09 01:28:50 -0800
commitfa0f8720e168c95bcd6a8bd57d5abf09c488fd32 (patch)
tree95fe08eef8b1e98e94836df2633bb1b4df51261c /misc
parentemerge-webrsync: handle gentoo-YYYYMMDD directory name (diff)
downloadportage-fa0f8720e168c95bcd6a8bd57d5abf09c488fd32.tar.gz
portage-fa0f8720e168c95bcd6a8bd57d5abf09c488fd32.tar.bz2
portage-fa0f8720e168c95bcd6a8bd57d5abf09c488fd32.zip
emerge-delta-webrsync: handle gentoo-YYYYMMDD directory name
Bug: https://bugs.gentoo.org/693454 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/emerge-delta-webrsync13
1 files changed, 6 insertions, 7 deletions
diff --git a/misc/emerge-delta-webrsync b/misc/emerge-delta-webrsync
index c5f6fbbd3..cda5a9229 100755
--- a/misc/emerge-delta-webrsync
+++ b/misc/emerge-delta-webrsync
@@ -332,7 +332,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() {
@@ -361,23 +361,22 @@ sync_local() {
return 1
fi
else
- if ! do_tar "${file}" xf - -C "${TMPDIR}" ; then
+ if ! do_tar "${file}" -x --strip-components=1 -f - -C "${TMPDIR}" ; then
eecho "tar failed to extract the image. tarball is corrupt? (${file})"
- rm -fr "${TMPDIR}"/portage
+ rm -fr "${TMPDIR}"
return 1
fi
local rsync_opts="${PORTAGE_RSYNC_OPTS} ${PORTAGE_RSYNC_EXTRA_OPTS}"
- if chown ${ownership} "${TMPDIR}"/portage > /dev/null 2>&1; then
- chown -R ${ownership} "${TMPDIR}"/portage
+ if chown ${ownership} "${TMPDIR}" > /dev/null 2>&1; then
+ chown -R ${ownership} "${TMPDIR}"
rsync_opts+=" --owner --group"
fi
- cd "${TMPDIR}"/portage
rsync ${rsync_opts} . "${repo_location%%/}"
cd "${DISTDIR}"
__vecho "Cleaning up ..."
- rm -fr "${TMPDIR}"/portage
+ rm -fr "${TMPDIR}"
fi
if has metadata-transfer ${FEATURES} ; then