X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fcommon;h=84640e2a6e7eddac3d33e825f40939e9f3bb04a0;hb=2c070e8e93167b48816a0af8e59e79f82cf293cd;hp=a42c18ff9481be77fa36ec25a6904b416bc06450;hpb=883c05418a2987751597e906ec2c63b1f5425df6;p=dak.git diff --git a/config/debian/common b/config/debian/common index a42c18ff..84640e2a 100644 --- a/config/debian/common +++ b/config/debian/common @@ -3,11 +3,8 @@ # # Set $PROGRAM to a string to have it added to the output. function log () { - if [ -z "${PROGRAM}" ]; then - echo "$(date +"%b %d %H:%M:%S") $(hostname -s) [$$] $@" - else - echo "$(date +"%b %d %H:%M:%S") $(hostname -s) ${PROGRAM}[$$]: $@" - fi + local prefix=${PROGRAM:-} + echo "$(date +"%b %d %H:%M:%S") $(hostname -s) ${prefix}[$$]: $@" } # log the message using log() but then also send a mail @@ -39,6 +36,8 @@ function make_buildd_dir () { dak manage-build-queues -a for dist in $(ls -1 ${incoming}/dists/); do + # Skip project trace directory + if [ "${dist}x" = "projectx" ]; then continue; fi cd ${incoming}/dists/${dist} mkdir -p tree/${STAMP} cp -al ${incoming}/dists/${dist}/buildd/. tree/${STAMP}/ @@ -48,6 +47,26 @@ function make_buildd_dir () { } +# Process (oldstable)-proposed-updates "NEW" queue +function punew_do() { + date -u -R >> REPORT + dak process-policy $1 | tee -a REPORT | mail -a "X-Debian: DAK" -e -s "NEW changes in $1" debian-release@lists.debian.org -- -F "Debian FTP Masters" -f + echo >> REPORT +} + +# These versions used in dinstall +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" +} + # Do the unchecked processing, in case we have files. function do_unchecked () { cd $unchecked @@ -107,3 +126,9 @@ function reports() { dak cruft-report -s experimental >> $webdir/cruft-report-daily.txt cat $webdir/cruft-report-daily.txt | mail -a "X-Debian: DAK" -e -s "Debian archive cruft report for $(date +%D)" ftpmaster@ftp-master.debian.org -- -F "Debian FTP Masters" -f ftpmaster@ftp-master.debian.org } + +function pg_timestamp() { + tsname=${1:-"unknown"} + log "Saving postgres transaction id for ${tsname}" + psql -tAc 'select txid_current();' > $base/backup/txid_${tsname}_$(date +%Y.%m.%d-%H:%M:%S) +}