aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2007-02-01 00:17:17 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2007-02-01 00:17:17 +0000
commit67bd3cba961ed68331c171f2c41620f4ff32d585 (patch)
tree821d0a2cbad2b07f6a00ab88f36a5b7a1ad47a6a
parent29410d3197b59af4de6bc9c4d004026e2666dde6 (diff)
downloadpaludis-67bd3cba961ed68331c171f2c41620f4ff32d585.tar.gz
paludis-67bd3cba961ed68331c171f2c41620f4ff32d585.tar.xz
Stop rsync from creating the local repo directory with restrictive permissions.
-rw-r--r--ebuild/syncers/dotar.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/ebuild/syncers/dotar.in b/ebuild/syncers/dotar.in
index 8ef1573..191235b 100644
--- a/ebuild/syncers/dotar.in
+++ b/ebuild/syncers/dotar.in
@@ -119,13 +119,15 @@ TARFILE="${URL##*/}"
"${FETCHER}" "${FETCHER_OPTIONS[@]}" "${URL}" "${TEMP}/${TARFILE}" || exit $?
-( cd "${TEMP}" && "${PALUDIS_EBUILD_DIR}/utils/dounpack" "${DOUNPACK_OPTIONS[@]}" "${TEMP}/${TARFILE}" ) || exit $?
+UNPACKDIR="${TEMP}/repository"
+mkdir "${UNPACKDIR}"
+( cd "${UNPACKDIR}" && "${PALUDIS_EBUILD_DIR}/utils/dounpack" "${DOUNPACK_OPTIONS[@]}" "${TEMP}/${TARFILE}" ) || exit $?
rm "${TEMP}/${TARFILE}"
-if [[ -z "$( ls -A "${TEMP}" )" ]]; then
+if [[ -z "$( ls -A "${UNPACKDIR}" )" ]]; then
eerror "No files were extracted (not an archive?)"
- rmdir "${TEMP}"
+ rm -rf "${TEMP}"
exit 1
fi
@@ -133,7 +135,7 @@ fi
rsync --recursive --links --safe-links --perms --times --compress --force \
--whole-file --delete --delete-after --stats --timeout=180 \
--exclude=/distfiles --exclude=/packages --exclude=/local \
- --exclude=/.cache --progress "${RSYNC_OPTIONS[@]}" "${TEMP}/" "${LOCAL}/" || exit $?
+ --exclude=/.cache --progress "${RSYNC_OPTIONS[@]}" "${UNPACKDIR}/" "${LOCAL}/" || exit $?
rm -rf "${TEMP}"