]> err.no Git - dak/commitdiff
dinstall
authorJoerg Jaspert <joerg@debian.org>
Fri, 1 Jan 2010 16:14:51 +0000 (17:14 +0100)
committerJoerg Jaspert <joerg@debian.org>
Fri, 1 Jan 2010 16:14:51 +0000 (17:14 +0100)
maintain an archive serial: line in the project trace file

Signed-off-by: Joerg Jaspert <joerg@debian.org>
config/debian/dinstall.functions
config/debian/dinstall.variables

index 463dec3799a5d227692d43bf3ee9c3f8622d4137..cb772fd32dabc2d64f781fc11a5a5ead32edb32b 100644 (file)
@@ -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}/. .
 }
index c1b3b06c9eab48ae582da4ef041065d1367ce6e7..d2cdfd1cb3729abaa0284faac8168858f9d80161 100644 (file)
@@ -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"