]> git.decadent.org.uk Git - dak.git/blob - scripts/debian/generate-d-i
391e830860b51053f79d22fe8b45c44cb58c455b
[dak.git] / scripts / debian / generate-d-i
1 #!/bin/bash
2
3 # Original written from Jeroen van Wolffelaar <jeroen@debian.org>
4
5 set -e
6 export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
7 . $SCRIPTVARS
8
9 export PAGER=cat
10
11 exec > $webdir/d-i 2>&1
12
13 testing_id=$(psql -t -c "SELECT id FROM suite WHERE suite_name='testing'")
14 testing_pu_id=$(psql -t -c "SELECT id FROM suite WHERE suite_name='testing-proposed-updates'")
15 unstable_id=$(psql -t -c "SELECT id FROM suite WHERE suite_name='unstable'")
16
17 echo "udeb's in testing that don't (anymore) correspond to any testing source:"
18 psql -c "
19   SELECT
20     b.package,
21     b.version,
22     (SELECT arch_string from architecture where b.architecture = architecture.id) as arch,
23     s.source
24   FROM bin_associations ba
25   LEFT JOIN binaries b on (ba.bin = b.id)
26   LEFT JOIN source s on (b.source = s.id)
27   WHERE ba.suite = ${testing_id}
28     AND s.id NOT IN (SELECT source from src_associations WHERE suite = ${testing_id})
29     AND b.type = 'udeb'
30   ORDER BY s.source, b.package, b.architecture;
31   "
32
33 echo "udeb's in unstable that should be in testing too:"
34 psql -c "
35   SELECT
36     b.package,
37     b.version,
38     (SELECT arch_string from architecture where b.architecture = architecture.id) as arch,
39     s.source
40   FROM bin_associations ba
41   LEFT JOIN binaries b on (ba.bin=b.id)
42   LEFT JOIN source s on (b.source=s.id)
43   WHERE ba.suite = ${unstable_id}
44     AND NOT EXISTS (SELECT 1 FROM bin_associations ba2 WHERE ba2.suite = ${testing_id} AND ba2.bin = ba.bin)
45     AND s.id IN (SELECT source from src_associations WHERE suite = ${testing_id})
46     AND b.type = 'udeb'
47     AND b.architecture IN (SELECT architecture FROM suite_architectures WHERE suite = ${testing_id})
48   ORDER BY s.source, b.package, b.architecture;
49   "
50
51 echo "udeb's in t-p-u that should be in testing too:"
52 psql -c "
53   SELECT
54     b.package,
55     b.version,
56     (SELECT arch_string from architecture where b.architecture=architecture.id) as arch,
57     s.source
58   FROM bin_associations ba
59   LEFT JOIN binaries b ON ba.bin = b.id
60   LEFT JOIN source s ON b.source = s.id
61   WHERE ba.suite = ${testing_pu_id}
62     AND NOT EXISTS (SELECT 1 FROM bin_associations ba2 WHERE ba2.suite = ${testing_id} AND ba2.bin = ba.bin)
63     AND s.id IN (SELECT source from src_associations WHERE suite = ${testing_id})
64     AND b.type = 'udeb'
65     AND b.architecture IN (SELECT architecture FROM suite_architectures WHERE suite = ${testing_id})
66   ORDER BY s.source, b.package, b.architecture;
67   "