test-bug-673536-pre-depends-breaks-loop 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'native'
  7. buildsimplenativepackage 'advanced' 'native' '1' 'stable'
  8. buildsimplenativepackage 'advanced' 'native' '2' 'unstable' 'Pre-Depends: basic'
  9. buildsimplenativepackage 'basic' 'native' '2' 'unstable' 'Pre-Depends: common'
  10. buildsimplenativepackage 'common' 'native' '2~conflict' 'unstable-conflict' 'Conflicts: advanced (<= 1)'
  11. buildsimplenativepackage 'common' 'native' '2~break' 'unstable-break' 'Breaks: advanced (<= 1)'
  12. setupaptarchive
  13. # we check with 'real' packages here as the simulation reports a 'Conf broken'
  14. # which is technical correct for the simulation, but testing errormsg is ugly
  15. cp -a rootdir/var/lib/dpkg/status dpkg.status.backup
  16. testloopbreak() {
  17. cp -a dpkg.status.backup rootdir/var/lib/dpkg/status
  18. rm -f rootdir/var/lib/apt/extended_states
  19. testsuccess aptget install advanced=1 -y -t "$1"
  20. testdpkginstalled advanced
  21. testdpkgnotinstalled basic common
  22. testsuccess aptget dist-upgrade -y -t "$1"
  23. testdpkginstalled advanced basic common
  24. }
  25. testloopbreak 'unstable-break'
  26. testloopbreak 'unstable-conflict'