提交 7066337f 编写于 作者: A Ansgar Burchardt

generate-d-i: Do not hardcode suite ids.

The suite.id for testing and testing-proposed-updates changed with the
wheezy release.
上级 18f89c1a
......@@ -10,6 +10,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 +24,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,9 +40,9 @@ 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)
ORDER BY s.source, b.package, b.architecture;
......@@ -55,9 +58,9 @@ 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)
ORDER BY s.source, b.package, b.architecture;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册