X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=scripts%2Fdebian%2Fmkfilesindices;h=c16fde6aa77eb4efbe615d1e472cc2947a9c7c9a;hb=629c016d5b4acb451555548c3c00175b4dd9cd55;hp=4401289e7e2a62f68e28d2be716958cc203c8330;hpb=47537927e128d1118ea2515c13a13b6f176355e4;p=dak.git diff --git a/scripts/debian/mkfilesindices b/scripts/debian/mkfilesindices index 4401289e..c16fde6a 100755 --- a/scripts/debian/mkfilesindices +++ b/scripts/debian/mkfilesindices @@ -10,7 +10,7 @@ ARCHLIST=$(tempfile) echo "Querying projectb..." -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 projectb -At | sed 's/|//;s/|all$/|/;s,^/srv/ftp.debian.org/ftp,.,' | sort >$ARCHLIST +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 projectb -At | sed 's/|//;s,^/srv/ftp.debian.org/ftp,.,' | sort >$ARCHLIST includedirs () { perl -ne 'print; while (m,/[^/]+$,) { $_=$`; print $_ . "\n" unless $d{$_}++; }' @@ -27,18 +27,19 @@ echo "Generating sources list..." cd $base/ftp find ./dists -maxdepth 1 \! -type d find ./dists \! -type d | grep "/source/" -) | sort -u | gzip -9 > source.list.gz +) | sort -u | gzip --rsyncable -9 > source.list.gz echo "Generating arch lists..." -ARCHES=$( (<$ARCHLIST sed -n 's/^.*|//p'; echo amd64) | grep . | sort -u) +ARCHES=$( (<$ARCHLIST sed -n 's/^.*|//p'; echo amd64) | grep . | grep -v all | sort -u) for a in $ARCHES; do (sed -n "s/|$a$//p" $ARCHLIST + sed -n 's/|all$//p' $ARCHLIST cd $base/ftp find ./dists -maxdepth 1 \! -type d find ./dists \! -type d | grep -E "(proposed-updates.*_$a.changes$|/main/disks-$a/|/main/installer-$a/|/Contents-$a|/binary-$a/)" - ) | sort -u | gzip -9 > arch-$a.list.gz + ) | sort -u | gzip --rsyncable -9 > arch-$a.list.gz done echo "Generating suite lists..." @@ -61,7 +62,7 @@ printf 'SELECT id, suite_name FROM suite\n' | psql -F' ' -At projectb | done ) suite_list $id | tr -d ' ' | sed 's,^/srv/ftp.debian.org/ftp,.,' - ) | sort -u | gzip -9 > suite-${suite}.list.gz + ) | sort -u | gzip --rsyncable -9 > suite-${suite}.list.gz done echo "Finding everything on the ftp site to generate sundries $(date +"%X")..." @@ -81,12 +82,12 @@ for a in $ARCHES; do done (cd $base/ftp/ - for dist in unstable testing; do - find ./dists/$dist/main/i18n/ \! -type d | sort -u | gzip -9 > $base/ftp/indices/files/components/translation-$dist.list.gz + for dist in sid squeeze; do + find ./dists/$dist/main/i18n/ \! -type d | sort -u | gzip --rsyncable -9 > $base/ftp/indices/files/components/translation-$dist.list.gz done ) -(cat ../arch-i386.files ../arch-amd64.files; zcat suite-proposed-updates.list.gz ; zcat translation-unstable.list.gz ; zcat translation-testing.list.gz) | +(cat ../arch-i386.files ../arch-amd64.files; zcat suite-oldstable.list.gz suite-proposed-updates.list.gz ; zcat translation-sid.list.gz ; zcat translation-squeeze.list.gz) | sort -u | poolfirst > ../typical.files rm -f $ARCHLIST