test-bug-64141-install-dependencies-for-on-hold 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'native' 'strange-arch'
  7. insertpackage 'unstable' 'unrelated' 'strange-arch' '1'
  8. insertinstalledpackage 'apt' 'native' '0.8.9' 'Depends: libc6 (>= 2.3.4)'
  9. insertinstalledpackage 'libc6' 'native' '2.4.1-1'
  10. insertinstalledpackage 'oldcrap' 'all' '1-1'
  11. insertpackage 'unstable' 'apt' 'native' '0.8.10' 'Depends: libc6 (>= 2.10), libdb4.8
  12. Breaks: oldcrap'
  13. insertpackage 'unstable' 'libc6' 'native' '2.11.2-7'
  14. insertpackage 'unstable' 'libdb4.8' 'native' '4.8.30-3'
  15. setupaptarchive
  16. testfailureequal 'Reading package lists...
  17. Building dependency tree...
  18. Calculating upgrade...
  19. The following packages will be REMOVED:
  20. oldcrap
  21. The following NEW packages will be installed:
  22. libdb4.8
  23. The following packages will be upgraded:
  24. apt libc6
  25. 2 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
  26. After this operation, 0 B of additional disk space will be used.
  27. E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only
  28. testsuccess aptmark hold apt
  29. testfailureequal 'Reading package lists...
  30. Building dependency tree...
  31. Calculating upgrade...
  32. The following packages have been kept back:
  33. apt
  34. The following packages will be upgraded:
  35. libc6
  36. 1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
  37. After this operation, 0 B of additional disk space will be used.
  38. E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only -o Test='hold-back-apt'