X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fdinstall.functions;h=f351ad4aa73258b4a4a43d7ebd9eeb01c182570f;hb=9639afdb34ea7c5fdaf62e05a78ca0aab288f6de;hp=498999eb5f879c0e394064f7cfc7b268c4cb2648;hpb=2b6bf8a972c6d40b6f5686aa7676dc45e1e65850;p=dak.git diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions index 498999eb..f351ad4a 100644 --- a/config/debian/dinstall.functions +++ b/config/debian/dinstall.functions @@ -1,10 +1,7 @@ # -*- mode:sh -*- -# Timestamp. Used for dinstall stat graphs -function ts() { - echo "Archive maintenance timestamp ($1): $(date +%H:%M:%S)" -} # Remove daily lock +# FIXME: Dead code when switched to cronscript function remove_daily_lock() { rm -f $LOCK_DAILY } @@ -50,7 +47,7 @@ function onerror() { } ######################################################################## -# the actual dinstall functions follow # +# the actual functions follow # ######################################################################## # pushing merkels QA user, part one @@ -192,13 +189,13 @@ function mpfm() { log "Generating package / file mapping" for archive in "${public_archives[@]}"; do + log " archive: ${archive}" archiveroot="$(get_archiveroot "${archive}")" dak make-pkg-file-mapping "${archive}" | bzip2 -9 > "${archiveroot}/indices/package-file.map.bz2" done } function packages() { - log "Generating Packages and Sources files" for archive in "${public_archives[@]}"; do log " Generating Packages/Sources for ${archive}" dak generate-packages-sources2 -a "${archive}" @@ -215,6 +212,7 @@ function pdiff() { function release() { log "Generating Release files" for archive in "${public_archives[@]}"; do + log " archive: ${archive}" dak generate-releases -a "${archive}" done } @@ -482,12 +480,6 @@ function bts() { sudo -u dak-unpriv dak bts-categorize } -function ddaccess() { - # Tell our dd accessible mirror to sync itself up. Including ftp dir. - log "Trigger dd accessible parts sync including ftp dir" - ${scriptsdir}/sync-dd dd-sync dd-sync1 dd-sync2 sync -} - function mirrorpush() { log "Checking the public archive copies..." @@ -615,7 +607,6 @@ function logstats() { # save timestamp when we start function savetimestamp() { - NOW=`date "+%Y.%m.%d-%H:%M:%S"` echo ${NOW} > "${dbdir}/dinstallstart" } @@ -663,6 +654,7 @@ function changelogs() { fi } +# Generate a list of extra mirror files, sha256sum em and sign that function signotherfiles() { log "Signing extra mirror files" @@ -681,3 +673,12 @@ function signotherfiles() { rm -f ${TMPLO} done } + +function startup() { + touch "${DINSTALLSTART}" + ts "startup" + lockfile -l 3600 "${LOCK_DAILY}" + trap onerror ERR + touch "${LOCK_BRITNEY}" + TMPFILES="${TMPFILES} ${LOCK_DAILY} ${LOCK_BRITNEY}" +}