+
+# 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
+}
+
+# extract changelogs and stuff
+function changelogs() {
+ log "Extracting changelogs"
+ dak make-changelog -e
+ mkdir -p ${exportpublic}/changelogs
+ cd ${exportpublic}/changelogs
+ rsync -aHW --delete --delete-after --ignore-errors ${exportdir}/changelogs/. .
+ sudo -H -u archvsync /home/archvsync/runmirrors metaftpdo > ~dak/runmirrors-metadata.log 2>&1 &
+}