From: Joerg Jaspert Date: Sat, 16 Mar 2013 19:02:12 +0000 (+0100) Subject: adjust for backports merge X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=5d368697b06f2473fd33eda33dfd3fb65cbf1587;p=dak.git adjust for backports merge Signed-off-by: Joerg Jaspert --- diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions index 21d75e00..ef6b8642 100644 --- a/config/debian/dinstall.functions +++ b/config/debian/dinstall.functions @@ -385,19 +385,26 @@ function mkfilesindices() { } function mkchecksums() { - dsynclist=$dbdir/dsync.list - md5list=$indices/md5sums + local archiveroot + + for archive in "${public_archives[@]}"; do + dsynclist=$dbdir/dsync.${archive}.list + md5list=$indices/md5sums - log -n "Creating md5 / dsync index file ... " + log -n "Creating md5 / dsync index file for ${archive}... " - cd "$ftpdir" - ${bindir}/dsync-flist -q generate $dsynclist --exclude $dsynclist --md5 - ${bindir}/dsync-flist -q md5sums $dsynclist | gzip -9n > ${md5list}.gz - ${bindir}/dsync-flist -q link-dups $dsynclist || true + archiveroot="$(get_archiveroot "${archive}")" + cd "$archiveroot" + ${bindir}/dsync-flist -q generate $dsynclist --exclude $dsynclist --md5 + ${bindir}/dsync-flist -q md5sums $dsynclist | gzip -9n > ${md5list}.gz + ${bindir}/dsync-flist -q link-dups $dsynclist || true + done } function mirror() { - log "Regenerating \"public\" mirror/ hardlink fun" + local archiveroot + + log "Regenerating \"public\" mirror/ hardlink fun for ${archive}" DATE_SERIAL=$(date +"%Y%m%d01") FILESOAPLUS1=$(awk '/serial/ { print $3+1 }' ${TRACEFILE} ) if [ "$DATE_SERIAL" -gt "$FILESOAPLUS1" ]; then @@ -409,8 +416,16 @@ function mirror() { echo "Using dak v1" >> ${TRACEFILE} echo "Running on host: $(hostname -f)" >> ${TRACEFILE} echo "Archive serial: ${SERIAL}" >> ${TRACEFILE} - cd ${mirrordir} - rsync -aH --link-dest ${ftpdir} --delete --delete-after --delete-excluded --exclude Packages.*.new --exclude Sources.*.new --ignore-errors ${ftpdir}/. . + + # Ugly "hack", but hey, it does what we want. + cp ${TRACEFILE} ${TRACEFILE_BDO} + + for archive in "${public_archives[@]}"; do + archiveroot="$(get_archiveroot "${archive}")" + mirrordir="${archiveroot}/../mirror" + cd ${mirrordir} + rsync -aH --link-dest ${archiveroot} --delete --delete-after --delete-excluded --exclude Packages.*.new --exclude Sources.*.new --ignore-errors ${archiveroot}/. . + done } function expire() { diff --git a/config/debian/dinstall.variables b/config/debian/dinstall.variables index c2daeb9c..47222a5d 100644 --- a/config/debian/dinstall.variables +++ b/config/debian/dinstall.variables @@ -46,5 +46,7 @@ LOCK_BUILDD="$lockdir/buildd.lock" # Statefile for the users DINSTALLSTATE="${webdir}/dinstall.status" -# The mirror trace file TRACEFILE="${ftpdir}/project/trace/ftp-master.debian.org" + +archiveroot="$(get_archiveroot "backports")" +TRACEFILE_BDO="${archiveroot}/project/trace/ftp-master.debian.org"