3 export SCRIPTVARS=/srv/ftp.debian.org/dak/config/debian/vars
7 cd $base/ftp/indices/files/components
11 echo "Querying projectb..."
13 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
16 perl -ne 'print; while (m,/[^/]+$,) { $_=$`; print $_ . "\n" unless $d{$_}++; }'
20 perl -e '@nonpool=(); while (<>) { if (m,^\./pool/,) { print; } else { push @nonpool, $_; } } print for (@nonpool);'
23 echo "Generating sources list..."
26 sed -n 's/|$//p' $ARCHLIST
28 find ./dists -maxdepth 1 \! -type d
29 find ./dists \! -type d | grep "/source/"
30 ) | sort -u | gzip -9 > source.list.gz
32 echo "Generating arch lists..."
34 ARCHES=$( (<$ARCHLIST sed -n 's/^.*|//p'; echo amd64) | grep . | grep -v all | sort -u)
36 (sed -n "s/|$a$//p" $ARCHLIST
37 sed -n 's/|all$//p' $ARCHLIST
40 find ./dists -maxdepth 1 \! -type d
41 find ./dists \! -type d | grep -E "(proposed-updates.*_$a.changes$|/main/disks-$a/|/main/installer-$a/|/Contents-$a|/binary-$a/)"
42 ) | sort -u | gzip -9 > arch-$a.list.gz
45 echo "Generating suite lists..."
48 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 projectb
50 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 projectb
53 printf 'SELECT id, suite_name FROM suite\n' | psql -F' ' -At projectb |
54 while read id suite; do
55 [ -e $base/ftp/dists/$suite ] || continue
58 distname=$(cd dists; readlink $suite || echo $suite)
59 find ./dists/$distname \! -type d
60 for distdir in ./dists/*; do
61 [ "$(readlink $distdir)" != "$distname" ] || echo $distdir
64 suite_list $id | tr -d ' ' | sed 's,^/srv/ftp.debian.org/ftp,.,'
65 ) | sort -u | gzip -9 > suite-${suite}.list.gz
68 echo "Finding everything on the ftp site to generate sundries $(date +"%X")..."
70 (cd $base/ftp; find . \! -type d \! -name 'Archive_Maintenance_In_Progress' | sort) >$ARCHLIST
73 zcat *.list.gz | cat - *.list | sort -u |
74 diff - $ARCHLIST | sed -n 's/^> //p' > sundries.list
76 echo "Generating files list $(date +"%X")..."
79 (echo ./project/trace; zcat arch-$a.list.gz source.list.gz) |
80 cat - sundries.list dists.list project.list docs.list indices.list |
81 sort -u | poolfirst > ../arch-$a.files
85 for dist in sid squeeze; do
86 find ./dists/$dist/main/i18n/ \! -type d | sort -u | gzip -9 > $base/ftp/indices/files/components/translation-$dist.list.gz
90 (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) |
91 sort -u | poolfirst > ../typical.files