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/|all$/|/;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 . | sort -u)
36 (sed -n "s/|$a$//p" $ARCHLIST
39 find ./dists -maxdepth 1 \! -type d
40 find ./dists \! -type d | grep -E "(proposed-updates.*_$a.changes$|/main/disks-$a/|/main/installer-$a/|/Contents-$a|/binary-$a/)"
41 if echo X sparc mips mipsel hppa X | grep -q " $a "; then
42 find ./dists/sarge/main/upgrade-kernel \! -type d
44 ) | sort -u | gzip -9 > arch-$a.list.gz
47 echo "Generating suite lists..."
50 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
52 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
55 printf 'SELECT id, suite_name FROM suite\n' | psql -F' ' -At projectb |
56 while read id suite; do
57 [ -e $base/ftp/dists/$suite ] || continue
60 distname=$(cd dists; readlink $suite || echo $suite)
61 find ./dists/$distname \! -type d
62 for distdir in ./dists/*; do
63 [ "$(readlink $distdir)" != "$distname" ] || echo $distdir
66 suite_list $id | tr -d ' ' | sed 's,^/srv/ftp.debian.org/ftp,.,'
67 ) | sort -u | gzip -9 > suite-${suite}.list.gz
70 echo "Finding everything on the ftp site to generate sundries $(date +"%X")..."
72 (cd $base/ftp; find . \! -type d \! -name 'Archive_Maintenance_In_Progress' | sort) >$ARCHLIST
75 zcat *.list.gz | cat - *.list | sort -u |
76 diff - $ARCHLIST | sed -n 's/^> //p' > sundries.list
78 echo "Generating files list $(date +"%X")..."
81 (echo ./project/trace; zcat arch-$a.list.gz source.list.gz) |
82 cat - sundries.list dists.list project.list docs.list indices.list |
83 sort -u | poolfirst > ../arch-$a.files
86 (cat ../arch-i386.files ../arch-amd64.files; zcat suite-oldstable.list.gz suite-proposed-updates.list.gz) |
87 sort -u | poolfirst > ../typical.files