[dak/master] debian/mirror: Generate trace file last
---
config/debian/dinstall.functions | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions
index 40b248f..adcd881 100755
--- a/config/debian/dinstall.functions
+++ b/config/debian/dinstall.functions
@@ -460,8 +460,19 @@ function mirror() {
for archive in "${public_archives[@]}"; do
archiveroot="$(get_archiveroot "${archive}")"
targetpath="${mirrordir}/${archive}"
- TRACEFILE="${archiveroot}/project/trace/ftp-master.debian.org"
- mkdir -p "${archiveroot}/project/trace/"
+ TRACEFILE="${targetpath}/project/trace/ftp-master.debian.org"
+
+ mkdir -p "${targetpath}/project/trace/"
+ cd ${targetpath}
+ rsync -aH --link-dest ${archiveroot} \
+ --delete --delete-after --delete-excluded \
+ --exclude "Packages.*.new" --exclude "Sources.*.new" \
+ --filter 'exclude /project/trace/*' \
+ --filter 'protect /project/' \
+ --filter 'protect /project/trace/' \
+ --filter 'protect /project/trace/*' \
+ --ignore-errors \
+ ${archiveroot}/. .
log "Regenerating \"public\" mirror/${archive} hardlink fun"
DATE_SERIAL=$(date +"%Y%m%d01")
@@ -480,16 +491,8 @@ function mirror() {
echo "Date: ${RFC822DATE}"
} >> ${TRACEFILE}
# Now make it accessible via one name, no matter on which host we run
- cd ${archiveroot}/project/trace/
+ cd ${targetpath}/project/trace/
ln -sf ftp-master.debian.org master
-
- mkdir -p ${targetpath}
- cd ${targetpath}
- rsync -aH --link-dest ${archiveroot} \
- --delete --delete-after --delete-excluded \
- --exclude "Packages.*.new" --exclude "Sources.*.new" \
- --ignore-errors \
- ${archiveroot}/. .
done
}
--
2.1.4
Reply to: