]> git.decadent.org.uk Git - dak.git/blobdiff - scripts/debian/generate-d-i
And check for existance, not type too
[dak.git] / scripts / debian / generate-d-i
index 5d6bca78f5333ddceb1c5e844a9abc8db42c2559..d5deea458a72d9122c6cdf937dc24ed0a728be82 100755 (executable)
@@ -3,6 +3,8 @@
 # Original written from Jeroen van Wolffelaar <jeroen@debian.org>
 
 set -e
+set -u
+
 export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
 . $SCRIPTVARS
 
@@ -44,7 +46,7 @@ psql -c "
     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;
   "
 
@@ -62,6 +64,6 @@ psql -c "
     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;
   "