2003-c-s-propup 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. #! /bin/bash
  2. #
  3. # © 2019 Niels Thykier <niels@thykier.net>
  4. # © 2019-2020 Ivo De Decker <ivodd@debian.org>
  5. # License: GPL-2+
  6. #
  7. # This program is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 2 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with this program. If not, see <https://www.gnu.org/licenses/>.
  19. set -e
  20. set -u
  21. . ${DAK_ROOT:?}/integration-tests/common
  22. . ${DAK_ROOT:?}/integration-tests/setup
  23. . ${DAK_ROOT:?}/integration-tests/dinstall
  24. echo "Dinstall::AllowSourceOnlyUploads true;" >> ${DAKBASE}/etc/dak.conf
  25. cat >> ${DAKBASE}/etc/dak.conf << EOF
  26. SuiteMappings
  27. {
  28. "propup-version testing unstable";
  29. };
  30. EOF
  31. setup_debian_like_archive
  32. import-fixture-signing-key
  33. reset_testing_and_unstable() {
  34. # reset and unstable to what they were
  35. dak control-suite -f -s testing < /dev/null
  36. echo "$unstable" | dak control-suite -f -s unstable
  37. }
  38. (
  39. packages=$(fixture-package-dir)
  40. upload_changes ${packages:?}/binnmupkg_0.1-1_amd64.changes
  41. upload_changes ${packages:?}/pkgnew_0.1-1_amd64.changes
  42. upload_changes ${packages:?}/pkgnew_0.1-2~exp_amd64.changes
  43. process_uploads
  44. echo a | dak process-new binnmupkg_0.1-1_amd64.changes
  45. echo a | dak process-new pkgnew_0.1-1_amd64.changes
  46. echo a | dak process-new pkgnew_0.1-2~exp_amd64.changes
  47. dak process-new --automatic
  48. dak process-policy new
  49. )
  50. unstable="$(dak control-suite -l unstable)"
  51. (
  52. to_testing="$(cat <<EOF
  53. binnmupkg 0.1-1 amd64
  54. binnmupkg 0.1-1 source
  55. EOF
  56. )"
  57. echo "$to_testing" | dak control-suite -s testing
  58. )
  59. dinstall
  60. check_all_suites c-s-propup-1
  61. (
  62. upload_changes ${packages:?}/binnmupkg_0.1-1+b1_amd64.changes
  63. process_uploads
  64. to_testing2="$(cat <<EOF
  65. binnmupkg 0.1-1+b1 amd64
  66. binnmupkg 0.1-1 source
  67. EOF
  68. )"
  69. # allow binnmupkg (from t-p-u) into testing
  70. # the binNMU should be propup-ed to unstable
  71. echo "$to_testing2" | dak control-suite -s testing
  72. )
  73. dinstall
  74. check_all_suites c-s-propup-2
  75. reset_testing_and_unstable
  76. to_testing3="$(cat <<EOF
  77. binnmupkg 0.1-1 amd64
  78. binnmupkg 0.1-1 source
  79. pkg-all1 0.1-2~exp all
  80. pkg-all2 0.1-2~exp all
  81. pkg-all3 0.1-2~exp all
  82. pkg-all4 0.1-2~exp all
  83. pkg-any1 0.1-2~exp amd64
  84. pkg-any2 0.1-2~exp amd64
  85. pkg-any3 0.1-2~exp amd64
  86. pkg-any4 0.1-2~exp amd64
  87. pkgnew 0.1-2~exp source
  88. EOF
  89. )"
  90. (
  91. # allow pkgnew (from experimental) into testing
  92. # normally, a package from experimental won't get into testing, but this is
  93. # meant to test what whould happen with a package from proposed-updates,
  94. # without adding an additional package to the testsuite
  95. echo "$to_testing3" | dak control-suite -s testing
  96. )
  97. dinstall
  98. check_all_suites c-s-propup-3
  99. reset_testing_and_unstable
  100. (
  101. upload_changes ${packages:?}/pkgnew_0.1-2_source.changes
  102. upload_changes ${packages:?}/pkgnew_0.1-2_all.changes
  103. process_uploads
  104. )
  105. unstable2="$(dak control-suite -l unstable)"
  106. (
  107. # try again, with newer version in unstable, but not all archs are built yet
  108. echo "$to_testing3" | dak control-suite -s testing
  109. )
  110. dinstall
  111. check_all_suites c-s-propup-4
  112. # reset to situation before last test
  113. dak control-suite -f -s testing < /dev/null
  114. echo "$unstable2" | dak control-suite -f -s unstable
  115. (
  116. upload_changes ${packages:?}/pkgnew_0.1-2_amd64.changes
  117. process_uploads
  118. # try again, with newer version in unstable, now available on all archs
  119. echo "$to_testing3" | dak control-suite -s testing
  120. )
  121. dinstall
  122. check_all_suites c-s-propup-5