test-ubuntu-bug-1304403-obsolete-priority-standard 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'i386'
  7. # Regression test for LP: #1304403
  8. #
  9. # The issue here is that libkadm5srv-mit8 (priority standard) is replaced
  10. # by a new libkadm5srv-mit9 and libkbd5-7 breaks on the old -mit8 package.
  11. # The -mit8 package is no longer downloadable (and hence not upgradeable)
  12. # normal upradable pkg
  13. # (libkdb5-7 that breaks on libkadm5srv-mit8 (<< 1.11+dfsg~)
  14. insertinstalledpackage 'upgradable' 'all' '1.0' '' 'extra'
  15. insertpackage 'unstable' 'upgradable' 'all' '2.0' 'Breaks: not-downloadable (<< 1.1)' 'optional'
  16. # no longer downloadable pkg (libkadm5srv-mit8, replaced by libkadm5srv-mit9)
  17. # but priority standard pushes it higher
  18. insertinstalledpackage 'not-downloadable' 'all' '1.0' '' 'standard'
  19. setupaptarchive
  20. # discourage keeping obsolete high-priority packages …
  21. testsuccessequal 'Reading package lists...
  22. Building dependency tree...
  23. Calculating upgrade...
  24. The following packages will be REMOVED:
  25. not-downloadable
  26. The following packages will be upgraded:
  27. upgradable
  28. 1 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
  29. Remv not-downloadable [1.0]
  30. Inst upgradable [1.0] (2.0 unstable [all])
  31. Conf upgradable (2.0 unstable [all])' aptget -s dist-upgrade
  32. # … but if it has dependencies we want to keep it as usual
  33. for i in $(seq 1 10); do
  34. insertinstalledpackage "depender$i" 'all' '1.0' 'Depends: not-downloadable'
  35. done
  36. testsuccessequal 'Reading package lists...
  37. Building dependency tree...
  38. Calculating upgrade...
  39. The following packages have been kept back:
  40. upgradable
  41. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.' aptget -s dist-upgrade