5 cd /org/ftp.debian.org/ftp/indices/files/components
9 echo "Querying projectb..."
11 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,^/org/ftp.debian.org/ftp,.,' | sort >$ARCHLIST
14 perl -ne 'print; while (m,/[^/]+$,) { $_=$`; print $_ . "\n" unless $d{$_}++; }'
18 perl -e '@nonpool=(); while (<>) { if (m,^\./pool/,) { print; } else { push @nonpool, $_; } } print for (@nonpool);'
21 echo "Generating sources list..."
24 sed -n 's/|$//p' $ARCHLIST
25 cd /org/ftp.debian.org/ftp
26 find ./dists -maxdepth 1 \! -type d
27 find ./dists \! -type d | grep "/source/"
28 ) | sort -u | gzip -9 > source.list.gz
30 echo "Generating arch lists..."
32 ARCHES=$( (<$ARCHLIST sed -n 's/^.*|//p'; echo amd64) | grep . | sort -u)
34 (sed -n "s/|$a$//p" $ARCHLIST
36 cd /org/ftp.debian.org/ftp;
37 find ./dists -maxdepth 1 \! -type d
38 find ./dists \! -type d | grep -E "(proposed-updates.*_$a.changes$|/main/disks-$a/|/main/installer-$a/|/Contents-$a|/binary-$a/)"
39 if echo X sparc mips mipsel hppa X | grep -q " $a "; then
40 find ./dists/sarge/main/upgrade-kernel \! -type d
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 /org/ftp.debian.org/ftp/dists/$suite ] || continue
57 (cd /org/ftp.debian.org/ftp;
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,^/org/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 /org/ftp.debian.org/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
84 (cat ../arch-i386.files ../arch-amd64.files; zcat suite-stable.list.gz) |
85 sort -u | poolfirst > ../typical.files