[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] adjust for backports merge



Signed-off-by: Joerg Jaspert <joerg@debian.org>
---
 config/debian/dinstall.functions |   35 +++++++++++++++++++++++++----------
 config/debian/dinstall.variables |    4 +++-
 2 files changed, 28 insertions(+), 11 deletions(-)

diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions
index 21d75e0..ef6b864 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 c2daeb9..47222a5 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"
-- 
1.7.2.5


Reply to: