From be83a167b00a5bc56a91c57f30875d52179e188c Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Fri, 1 Jan 2010 17:14:51 +0100 Subject: [PATCH] dinstall maintain an archive serial: line in the project trace file Signed-off-by: Joerg Jaspert --- config/debian/dinstall.functions | 14 +++++++++++--- config/debian/dinstall.variables | 3 +++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions index 463dec37..cb772fd3 100644 --- a/config/debian/dinstall.functions +++ b/config/debian/dinstall.functions @@ -390,9 +390,17 @@ function mkchecksums() { function mirror() { log "Regenerating \"public\" mirror/ hardlink fun" - date -u > ${ftpdir}/project/trace/ftp-master.debian.org - echo "Using dak v1" >> ${ftpdir}/project/trace/ftp-master.debian.org - echo "Running on host: $(hostname -f)" >> ${ftpdir}/project/trace/ftp-master.debian.org + DATE_SERIAL=$(date +"%Y%m%d01") + FILESOAPLUS1=$(awk '/serial/ { print $3+1 }' ${TRACEFILE} ) + if [ "$DATE_SERIAL" -gt "$FILESOAPLUS1" ]; then + SERIAL="$DATE_SERIAL" + else + SERIAL="$FILESOAPLUS1" + fi + date -u > ${TRACEFILE} + 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 --ignore-errors ${ftpdir}/. . } diff --git a/config/debian/dinstall.variables b/config/debian/dinstall.variables index c1b3b06c..d2cdfd1c 100644 --- a/config/debian/dinstall.variables +++ b/config/debian/dinstall.variables @@ -45,3 +45,6 @@ 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" -- 2.39.2