]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian/dinstall.functions
No longer update a tracefile hourly. Instead update our tracefile the second before...
[dak.git] / config / debian / dinstall.functions
index 26c1c8b8bd33c5a0fc30480468c82991cefbcd12..463dec3799a5d227692d43bf3ee9c3f8622d4137 100644 (file)
@@ -1,3 +1,4 @@
+# -*- mode:sh -*-
 # Timestamp. Used for dinstall stat graphs
 function ts() {
         echo "Archive maintenance timestamp ($1): $(date +%H:%M:%S)"
@@ -71,17 +72,18 @@ function updates() {
 
 # Process (oldstable)-proposed-updates "NEW" queue
 function punew_do() {
-    cd "${queuedir}/${1}"
     date -u -R >> REPORT
-    dak process-new -a -C COMMENTS >> REPORT || true
+    dak process-policy $1 | tee -a REPORT | mail -e -s "NEW changes in $1" debian-release@lists.debian.org
     echo >> REPORT
 }
 function punew() {
     log "Doing automated p-u-new processing"
+    cd "${queuedir}/p-u-new"
     punew_do "$1"
 }
 function opunew() {
     log "Doing automated o-p-u-new processing"
+    cd "${queuedir}/o-p-u-new"
     punew_do "$1"
 }
 
@@ -388,15 +390,13 @@ 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
     cd ${mirrordir}
     rsync -aH --link-dest ${ftpdir} --delete --delete-after --ignore-errors ${ftpdir}/. .
 }
 
-function wb() {
-    log "Trigger daily wanna-build run"
-    wbtrigger "daily"
-}
-
 function expire() {
     log "Expiring old database dumps..."
     cd $base/backup
@@ -545,3 +545,25 @@ function process_unchecked() {
     do_unchecked
     sync_debbugs
 }
+
+# do a run of newstage only before dinstall is on.
+function newstage() {
+    log "Processing the newstage queue"
+    UNCHECKED_WITHOUT_LOCK="-p"
+    do_newstage
+}
+
+# Function to update a "statefile" telling people what we are doing
+# (more or less).
+#
+# This should be called with the argument(s)
+#  - Status name we want to show.
+#
+function state() {
+    RIGHTNOW="$(date -u +"%a %b %d %T %Z %Y (%s)")"
+    cat >"${DINSTALLSTATE}" <<EOF
+Dinstall start: ${DINSTALLBEGIN}
+Current action: ${1}
+Action start: ${RIGHTNOW}
+EOF
+}