X-Git-Url: https://git.decadent.org.uk/gitweb/?p=dak.git;a=blobdiff_plain;f=scripts%2Fdebian%2Fimport_dataset.sh;h=e03ba3a36f1e0f4744c9203ca17d705e921869db;hp=183baddd92cd5e2834add8f700efe34ac4efff49;hb=872342797e672981af9f22c74c38d7d20510d949;hpb=52daa226e017dda5e5fe7d476d48f19ed9d18c3c diff --git a/scripts/debian/import_dataset.sh b/scripts/debian/import_dataset.sh index 183baddd..e03ba3a3 100755 --- a/scripts/debian/import_dataset.sh +++ b/scripts/debian/import_dataset.sh @@ -31,16 +31,13 @@ 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-updates) - # What file we look at. - INPUTFILE="/srv/release.debian.org/sets/squeeze-updates/current" + testing-debug|squeeze-updates|wheezy-updates|jessie-updates) DO_CHANGELOG="false" ;; *) @@ -59,7 +56,13 @@ if [ "x${DO_CHANGELOG}x" = "xtruex" ]; then BRITNEY=" --britney" fi -cat ${INPUTFILE} | dak control-suite --set ${IMPORTSUITE} ${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 +72,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