X-Git-Url: https://git.decadent.org.uk/gitweb/?p=dak.git;a=blobdiff_plain;f=scripts%2Fdebian%2Fimport_dataset.sh;h=6eb39cacda49ec5c1ad7c8bd9f2fd0b860523f3b;hp=6a8f1292fbf5ac29806c1e4eaceb9dc01f53c36b;hb=430ecbbc12f286d93b91764144b2c8394ef9ee0f;hpb=2390f8671de9de6449d21269b112c37b95c3dcbb diff --git a/scripts/debian/import_dataset.sh b/scripts/debian/import_dataset.sh index 6a8f1292..6eb39cac 100755 --- a/scripts/debian/import_dataset.sh +++ b/scripts/debian/import_dataset.sh @@ -31,16 +31,16 @@ export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars IMPORTSUITE=${1:-"testing"} BRITNEY="" +MD5SUM="${SSH_ORIGINAL_COMMAND}" case "${IMPORTSUITE}" in testing) - # What file we look at. - INPUTFILE="/srv/release.debian.org/britney/Heidi/set/current" DO_CHANGELOG="true" ;; - squeeze-volatile) - # What file we look at. - INPUTFILE="/srv/release.debian.org/volatile/set/squeeze-volatile" + testing-debug) + squeeze-updates) + wheezy-updates) + jessie-updates) DO_CHANGELOG="false" ;; *) @@ -52,14 +52,20 @@ esac # Change to a known safe location cd $masterdir -echo "Importing new data for ${INPUTSUITE} into database" +echo "Importing new data for ${IMPORTSUITE} into database" if [ "x${DO_CHANGELOG}x" = "xtruex" ]; then - rm ${ftpdir}/dists/${IMPORTSUITE}/ChangeLog + rm -f ${ftpdir}/dists/${IMPORTSUITE}/ChangeLog BRITNEY=" --britney" fi -cat ${INPUTFILE} | dak control-suite --set ${INPUTSUITE} ${BRITNEY} +tmpfile=$(mktemp) +trap "rm -f ${tmpfile}" EXIT +cat > ${tmpfile} +if ! echo "${MD5SUM} ${tmpfile}" | md5sum -c --quiet; then + exit 42 +fi +dak control-suite --set ${IMPORTSUITE} ${BRITNEY} < ${tmpfile} if [ "x${DO_CHANGELOG}x" = "xtruex" ]; then NOW=$(date "+%Y%m%d%H%M") @@ -69,6 +75,9 @@ if [ "x${DO_CHANGELOG}x" = "xtruex" ]; then find . -maxdepth 1 -mindepth 1 -type f -mmin +2880 -name 'ChangeLog.*' -delete fi +#echo "Regenerating Packages/Sources files, be patient" +#dak generate-packages-sources2 -s ${IMPORTSUITE} >/dev/null + echo "Done" exit 0