test-bug-680041-apt-mark-holds-correctly 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #!/bin/sh
  2. set -e
  3. TESTDIR=$(readlink -f $(dirname $0))
  4. . $TESTDIR/framework
  5. setupenvironment
  6. configarchitecture 'amd64'
  7. insertinstalledpackage 'pkgarch' 'amd64' '1'
  8. insertinstalledpackage 'pkgall' 'all' '1'
  9. insertpackage 'unstable' 'pkgarch' 'amd64' '2'
  10. insertpackage 'unstable' 'pkgall' 'all' '2'
  11. setupaptarchive
  12. runtests() {
  13. testempty aptmark showhold
  14. testequal 'Reading package lists...
  15. Building dependency tree...
  16. The following packages will be upgraded:
  17. pkgall pkgarch
  18. 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  19. After this operation, 0 B of additional disk space will be used.
  20. E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only
  21. testequal 'pkgarch set on hold.' aptmark hold pkgarch
  22. testequal 'pkgarch' aptmark showhold
  23. testequal 'Reading package lists...
  24. Building dependency tree...
  25. The following packages have been kept back:
  26. pkgarch
  27. The following packages will be upgraded:
  28. pkgall
  29. 1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
  30. After this operation, 0 B of additional disk space will be used.
  31. E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only
  32. testequal 'Canceled hold on pkgarch.' aptmark unhold pkgarch
  33. testempty aptmark showhold
  34. testequal 'Reading package lists...
  35. Building dependency tree...
  36. The following packages will be upgraded:
  37. pkgall pkgarch
  38. 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  39. After this operation, 0 B of additional disk space will be used.
  40. E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only
  41. testequal 'pkgall set on hold.' aptmark hold pkgall
  42. testequal 'pkgall' aptmark showhold
  43. testequal 'Reading package lists...
  44. Building dependency tree...
  45. The following packages have been kept back:
  46. pkgall
  47. The following packages will be upgraded:
  48. pkgarch
  49. 1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
  50. After this operation, 0 B of additional disk space will be used.
  51. E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only
  52. testequal 'Canceled hold on pkgall.' aptmark unhold pkgall
  53. testempty aptmark showhold
  54. }
  55. # single-arch
  56. runtests
  57. # multi-arch
  58. configarchitecture 'amd64' 'i386'
  59. runtests