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.
 
 
 
 
 
 

77 lines
2.4 KiB

  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. testfailureequal 'Reading package lists...
  15. Building dependency tree...
  16. Calculating upgrade...
  17. The following packages will be upgraded:
  18. pkgall pkgarch
  19. 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  20. After this operation, 0 B of additional disk space will be used.
  21. E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only
  22. testsuccessequal 'pkgarch set on hold.' aptmark hold pkgarch
  23. testsuccessequal 'pkgarch' aptmark showhold
  24. testfailureequal 'Reading package lists...
  25. Building dependency tree...
  26. Calculating upgrade...
  27. The following packages have been kept back:
  28. pkgarch
  29. The following packages will be upgraded:
  30. pkgall
  31. 1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
  32. After this operation, 0 B of additional disk space will be used.
  33. E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only
  34. testsuccessequal 'Canceled hold on pkgarch.' aptmark unhold pkgarch
  35. testempty aptmark showhold
  36. testfailureequal 'Reading package lists...
  37. Building dependency tree...
  38. Calculating upgrade...
  39. The following packages will be upgraded:
  40. pkgall pkgarch
  41. 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  42. After this operation, 0 B of additional disk space will be used.
  43. E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only
  44. testsuccessequal 'pkgall set on hold.' aptmark hold pkgall
  45. testsuccessequal 'pkgall' aptmark showhold
  46. testfailureequal 'Reading package lists...
  47. Building dependency tree...
  48. Calculating upgrade...
  49. The following packages have been kept back:
  50. pkgall
  51. The following packages will be upgraded:
  52. pkgarch
  53. 1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
  54. After this operation, 0 B of additional disk space will be used.
  55. E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only
  56. testsuccessequal 'Canceled hold on pkgall.' aptmark unhold pkgall
  57. testempty aptmark showhold
  58. }
  59. # single-arch
  60. runtests
  61. # multi-arch
  62. configarchitecture 'amd64' 'i386'
  63. runtests