X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=scripts%2Fdebian%2Fgenerate-d-i;h=d5deea458a72d9122c6cdf937dc24ed0a728be82;hb=9d77b10ef77da44cf458cc808c323c253b9b8c80;hp=49e93d2978b48a72e1394d7befc871a4b806dc02;hpb=18f89c1a61cd638209e81720ba2e6dc96ecdcf68;p=dak.git diff --git a/scripts/debian/generate-d-i b/scripts/debian/generate-d-i index 49e93d29..d5deea45 100755 --- a/scripts/debian/generate-d-i +++ b/scripts/debian/generate-d-i @@ -3,6 +3,8 @@ # Original written from Jeroen van Wolffelaar set -e +set -u + export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars . $SCRIPTVARS @@ -10,6 +12,9 @@ export PAGER=cat exec > $webdir/d-i 2>&1 +testing_id=$(psql -t -c "SELECT id FROM suite WHERE suite_name='testing'") +testing_pu_id=$(psql -t -c "SELECT id FROM suite WHERE suite_name='testing-proposed-updates'") +unstable_id=$(psql -t -c "SELECT id FROM suite WHERE suite_name='unstable'") echo "udeb's in testing that don't (anymore) correspond to any testing source:" psql -c " @@ -21,8 +26,8 @@ psql -c " FROM bin_associations ba LEFT JOIN binaries b on (ba.bin = b.id) LEFT JOIN source s on (b.source = s.id) - WHERE ba.suite = 4 - AND s.id NOT IN (SELECT source from src_associations WHERE suite = 4) + WHERE ba.suite = ${testing_id} + AND s.id NOT IN (SELECT source from src_associations WHERE suite = ${testing_id}) AND b.type = 'udeb' ORDER BY s.source, b.package, b.architecture; " @@ -37,11 +42,11 @@ psql -c " FROM bin_associations ba LEFT JOIN binaries b on (ba.bin=b.id) LEFT JOIN source s on (b.source=s.id) - WHERE ba.suite=5 - AND NOT EXISTS (SELECT 1 FROM bin_associations ba2 WHERE ba2.suite = 4 AND ba2.bin = ba.bin) - AND s.id IN (SELECT source from src_associations WHERE suite=4) + WHERE ba.suite = ${unstable_id} + AND NOT EXISTS (SELECT 1 FROM bin_associations ba2 WHERE ba2.suite = ${testing_id} AND ba2.bin = ba.bin) + AND s.id IN (SELECT source from src_associations WHERE suite = ${testing_id}) AND b.type = 'udeb' - AND b.architecture NOT IN (4,8,12) + AND b.architecture IN (SELECT architecture FROM suite_architectures WHERE suite = ${testing_id}) ORDER BY s.source, b.package, b.architecture; " @@ -55,10 +60,10 @@ psql -c " FROM bin_associations ba LEFT JOIN binaries b ON ba.bin = b.id LEFT JOIN source s ON b.source = s.id - WHERE ba.suite = 3 - AND NOT EXISTS (SELECT 1 FROM bin_associations ba2 WHERE ba2.suite = 4 AND ba2.bin = ba.bin) - AND s.id IN (SELECT source from src_associations WHERE suite = 4) + WHERE ba.suite = ${testing_pu_id} + AND NOT EXISTS (SELECT 1 FROM bin_associations ba2 WHERE ba2.suite = ${testing_id} AND ba2.bin = ba.bin) + AND s.id IN (SELECT source from src_associations WHERE suite = ${testing_id}) AND b.type = 'udeb' - AND b.architecture NOT IN (4,8,12) + AND b.architecture IN (SELECT architecture FROM suite_architectures WHERE suite = ${testing_id}) ORDER BY s.source, b.package, b.architecture; "