X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fdinstall.functions;h=a7bf95ca8b8bd9d2a72deaef04ed55e5f13a1f7b;hb=01bea71d37e475eb08b1bc4e3e4fcd1cf62b078a;hp=58f8ddb1ce02c7317acbf03ce9e2b42f10714100;hpb=86e42f45e177df65e5a71352b55b911a7bca6153;p=dak.git diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions index 58f8ddb1..a7bf95ca 100644 --- a/config/debian/dinstall.functions +++ b/config/debian/dinstall.functions @@ -152,8 +152,6 @@ function mpfm() { function packages() { log "Generating Packages and Sources files" - #cd $configdir - #dak generate-packages-sources dak generate-packages-sources2 dak contents generate } @@ -234,7 +232,7 @@ function mkmaintainers() { function copyoverrides() { log 'Copying override files into public view ...' - for ofile in ${overridedir}/override.{lenny,squeeze,wheezy,sid}.{,extra.}{main,contrib,non-free}*; do + for ofile in ${overridedir}/override.{squeeze,wheezy,sid}.{,extra.}{main,contrib,non-free}*; do bname=${ofile##*/} gzip -9cv --rsyncable ${ofile} > ${indices}/${bname}.gz chmod g+w ${indices}/${bname}.gz @@ -248,7 +246,8 @@ function mkfilesindices() { ARCHLIST=$(tempfile) log "Querying postgres" - echo 'SELECT l.path, f.filename, a.arch_string FROM location l JOIN files f ON (f.location = l.id) LEFT OUTER JOIN (binaries b JOIN architecture a ON (b.architecture = a.id)) ON (f.id = b.file)' | psql -At | sed 's/|//;s,^/srv/ftp-master.debian.org/ftp,.,' | sort >$ARCHLIST + local query='SELECT l.path, f.filename, a.arch_string FROM location l JOIN files f ON (f.location = l.id) LEFT OUTER JOIN (binaries b JOIN architecture a ON (b.architecture = a.id)) ON (f.id = b.file)' + psql -At -c "$query" | sed 's/|//;s,^/srv/ftp-master.debian.org/ftp,.,' | sort >$ARCHLIST includedirs () { perl -ne 'print; while (m,/[^/]+$,) { $_=$`; print $_ . "\n" unless $d{$_}++; }' @@ -281,12 +280,15 @@ function mkfilesindices() { log "Generating suite lists" suite_list () { - printf 'SELECT DISTINCT l.path, f.filename FROM (SELECT sa.source AS source FROM src_associations sa WHERE sa.suite = %d UNION SELECT b.source AS source FROM bin_associations ba JOIN binaries b ON (ba.bin = b.id) WHERE ba.suite = %d) s JOIN dsc_files df ON (s.source = df.source) JOIN files f ON (df.file = f.id) JOIN location l ON (f.location = l.id)\n' $1 $1 | psql -F' ' -A -t + local query + query="$(printf 'SELECT DISTINCT l.path, f.filename FROM (SELECT sa.source AS source FROM src_associations sa WHERE sa.suite = %d UNION SELECT b.source AS source FROM bin_associations ba JOIN binaries b ON (ba.bin = b.id) WHERE ba.suite = %d) s JOIN dsc_files df ON (s.source = df.source) JOIN files f ON (df.file = f.id) JOIN location l ON (f.location = l.id)' $1 $1)" + psql -F' ' -A -t -c "$query" - printf 'SELECT l.path, f.filename FROM bin_associations ba JOIN binaries b ON (ba.bin = b.id) JOIN files f ON (b.file = f.id) JOIN location l ON (f.location = l.id) WHERE ba.suite = %d\n' $1 | psql -F' ' -A -t + query="$(printf 'SELECT l.path, f.filename FROM bin_associations ba JOIN binaries b ON (ba.bin = b.id) JOIN files f ON (b.file = f.id) JOIN location l ON (f.location = l.id) WHERE ba.suite = %d' $1)" + psql -F' ' -A -t -c "$query" } - printf 'SELECT id, suite_name FROM suite\n' | psql -F' ' -At | + psql -F' ' -At -c "SELECT id, suite_name FROM suite" | while read id suite; do [ -e $base/ftp/dists/$suite ] || continue ( @@ -404,7 +406,7 @@ function mirrorpush() { # match. continue fi - broken=$(( broken + 1 )) + broken=$(( broken + 1 )) echo "File ${subdir}/${NAME} is missing" continue fi @@ -446,9 +448,12 @@ function i18n2() { STAMP=$(date "+%Y%m%d%H%M") mkdir -p ${scriptdir}/i18n/${STAMP} cd ${scriptdir}/i18n/${STAMP} - dak control-suite -l stable > squeeze - dak control-suite -l testing > wheezy - dak control-suite -l unstable > sid + for suite in stable testing unstable; do + codename=$(dak admin s show ${suite}|grep '^Codename') + codename=${codename##* } + echo "Codename is ${codename}" + dak control-suite -l ${suite} >${codename} + done echo "${STAMP}" > timestamp gpg --secret-keyring /srv/ftp-master.debian.org/s3kr1t/dot-gnupg/secring.gpg --keyring /srv/ftp-master.debian.org/s3kr1t/dot-gnupg/pubring.gpg --no-options --batch --no-tty --armour --default-key 55BE302B --detach-sign -o timestamp.gpg timestamp rm -f md5sum