test-bug-747261-arch-specific-conflicts 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/sh
  2. set -e
  3. TESTDIR=$(readlink -f $(dirname $0))
  4. . $TESTDIR/framework
  5. setupenvironment
  6. configarchitecture 'amd64' 'sparc' 'armel'
  7. msgtest 'Check that dpkg supports' 'arch-specific dependencies'
  8. set +e
  9. # this fails always, the question is just how it fails
  10. dpkg-checkbuilddeps -d 'foobar:barfoo' /dev/null 2>/dev/null >/dev/null
  11. RETURNCODE=$?
  12. set -e
  13. if [ "$RETURNCODE" != '1' ]; then
  14. dpkg-checkbuilddeps -d 'foobar:barfoo' /dev/null || true
  15. echo "Command had returncode: $RETURNCODE"
  16. msgskip
  17. exit 0
  18. else
  19. msgpass
  20. fi
  21. buildsimplenativepackage 'libc6' 'amd64,sparc,armel' '1' 'stable' 'Multi-Arch: same'
  22. buildsimplenativepackage 'libc6-i386' 'amd64' '1' 'stable' 'Conflicts: libc6:sparc'
  23. setupaptarchive
  24. testsuccess aptget install 'libc6:amd64' 'libc6:sparc' -y
  25. testdpkginstalled 'libc6:amd64' 'libc6:sparc'
  26. testdpkgnotinstalled 'libc6-i386' 'libc6:armel'
  27. testsuccess aptget install libc6-i386 -y
  28. testdpkginstalled 'libc6:amd64' 'libc6-i386'
  29. testdpkgnotinstalled 'libc6:sparc' 'libc6:armel'
  30. testsuccess aptget install libc6:armel -y
  31. testdpkginstalled 'libc6:amd64' 'libc6:armel' 'libc6-i386'
  32. testdpkgnotinstalled 'libc6:sparc'
  33. testsuccess aptget install libc6:sparc -y
  34. testdpkginstalled 'libc6:amd64' 'libc6:armel' 'libc6:sparc'
  35. testdpkgnotinstalled 'libc6-i386'
  36. testsuccess aptget purge 'libc6:*' 'libc6-i386' -y
  37. testdpkgnotinstalled 'libc6:amd64' 'libc6:armel' 'libc6:sparc' 'libc6-i386'
  38. # check that (the actually simpler) single arch is fine, too
  39. configarchitecture 'amd64'
  40. testfailure aptget install libc6:sparc -s
  41. testsuccess aptget install libc6 libc6-i386 -y