You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

73 lines
2.2 KiB

  1. #!/bin/sh
  2. # Ensure that the order in which packages are in the binary cache
  3. # does not effect if they can be found or not
  4. set -e
  5. TESTDIR="$(readlink -f "$(dirname "$0")")"
  6. . "$TESTDIR/framework"
  7. setupenvironment
  8. configarchitecture 'i386'
  9. insertpackage 'unstable' 'abar' 'i386' '1'
  10. insertpackage 'unstable' 'foobar' 'i386' '1' 'Depends: abar:amd64, zfoo:amd64'
  11. insertpackage 'unstable' 'zfoo' 'i386' '1'
  12. setupaptarchive
  13. testrun() {
  14. rm -f rootdir/var/lib/apt/extended_states
  15. testequal 'Reading package lists...
  16. Building dependency tree...
  17. The following NEW packages will be installed:
  18. abar zfoo
  19. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  20. Inst abar (1 unstable [i386])
  21. Inst zfoo (1 unstable [i386])
  22. Conf abar (1 unstable [i386])
  23. Conf zfoo (1 unstable [i386])' aptget install abar zfoo -s
  24. testequal 'Reading package lists...
  25. Building dependency tree...
  26. The following NEW packages will be installed:
  27. abar zfoo
  28. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  29. Inst abar (1 unstable [i386])
  30. Inst zfoo (1 unstable [i386])
  31. Conf abar (1 unstable [i386])
  32. Conf zfoo (1 unstable [i386])' aptget install abar:i386 zfoo:i386 -s
  33. testequal "Reading package lists...
  34. Building dependency tree...
  35. Package abar:amd64 is not available, but is referred to by another package.
  36. This may mean that the package is missing, has been obsoleted, or
  37. is only available from another source
  38. Package zfoo:amd64 is not available, but is referred to by another package.
  39. This may mean that the package is missing, has been obsoleted, or
  40. is only available from another source
  41. E: Package 'abar:amd64' has no installation candidate
  42. E: Package 'zfoo:amd64' has no installation candidate" aptget install abar:amd64 zfoo:amd64 -s
  43. cp -f rootdir/var/lib/dpkg/status status.backup
  44. insertinstalledpackage 'abar' 'i386' '1'
  45. insertinstalledpackage 'zfoo' 'i386' '1'
  46. testequal 'abar
  47. zfoo' aptmark showmanual abar zfoo
  48. testequal 'abar set to automatically installed.
  49. zfoo set to automatically installed.' aptmark auto abar zfoo
  50. testempty aptmark showmanual abar zfoo
  51. testequal 'abar
  52. zfoo' aptmark showauto abar zfoo
  53. mv -f status.backup rootdir/var/lib/dpkg/status
  54. }
  55. msgmsg 'Single-Arch testrun'
  56. testrun
  57. msgmsg 'Multi-Arch testrun'
  58. configarchitecture 'i386' 'amd64'
  59. testrun