generate-d-i 2.4 KB

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