test-bug-796070-downgrade-simulate 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'i386'
  7. insertpackage 'unstable' 'apt' 'all' '1.0.10.1' 'Depends: libapt-pkg4.16 (>= 1.0.10.1)'
  8. insertinstalledpackage 'libapt-pkg4.16' 'all' '1.0.10.1' 'Breaks: apt (<< 0.9.4~), libapt-inst1.5 (<< 0.9.9~)'
  9. insertinstalledpackage 'libapt-pkg5.0' 'all' '1.1~exp9' 'Breaks: apt (<< 1.1~exp4), libapt-inst1.5 (<< 0.9.9~)'
  10. insertinstalledpackage 'apt' 'all' '1.1~exp9' 'Depends: libapt-pkg5.0'
  11. insertpackage 'unstable' 'napt' 'all' '1.0.10.1' 'Depends: nlibapt-pkg4.16 (>= 1.0.10.1)'
  12. insertinstalledpackage 'nlibapt-pkg4.16' 'all' '1.0.10.1' 'Breaks: napt (<< 0.9.4~), nlibapt-inst1.5 (<< 0.9.9~)'
  13. insertinstalledpackage 'nlibapt-pkg5.0' 'all' '1.1~exp9' 'Breaks: napt (<< 1.1~exp4), nlibapt-inst1.5 (<< 0.9.9~)'
  14. insertinstalledpackage 'napt' 'all' '1.1~exp9' 'Depends: nlibapt-pkg5.0'
  15. insertpackage 'unstable' 'eapt' 'all' '1.0.10.1' 'Depends: elibapt-pkg4.16 (>= 1.0.10.1)
  16. Essential: yes'
  17. insertinstalledpackage 'elibapt-pkg4.16' 'all' '1.0.10.1' 'Breaks: eapt (<< 0.9.4~), elibapt-inst1.5 (<< 0.9.9~)'
  18. insertinstalledpackage 'elibapt-pkg5.0' 'all' '1.1~exp9' 'Breaks: eapt (<< 1.1~exp4), elibapt-inst1.5 (<< 0.9.9~)'
  19. insertinstalledpackage 'eapt' 'all' '1.1~exp9' 'Depends: elibapt-pkg5.0
  20. Essential: yes'
  21. setupaptarchive
  22. # Check with a normal package
  23. testsuccessequal 'Reading package lists...
  24. Building dependency tree...
  25. The following packages will be REMOVED:
  26. nlibapt-pkg5.0
  27. The following packages will be DOWNGRADED:
  28. napt
  29. 0 upgraded, 0 newly installed, 1 downgraded, 1 to remove and 0 not upgraded.
  30. Remv nlibapt-pkg5.0 [1.1~exp9] [napt:i386 ]
  31. Inst napt [1.1~exp9] (1.0.10.1 unstable [all])
  32. Conf napt (1.0.10.1 unstable [all])' apt install -s napt=1.0.10.1
  33. # Check with Essential
  34. testsuccessequal 'Reading package lists...
  35. Building dependency tree...
  36. The following packages will be REMOVED:
  37. elibapt-pkg5.0
  38. The following packages will be DOWNGRADED:
  39. eapt
  40. 0 upgraded, 0 newly installed, 1 downgraded, 1 to remove and 0 not upgraded.
  41. Inst eapt [1.1~exp9] (1.0.10.1 unstable [all]) [elibapt-pkg5.0:i386 on eapt:i386] [elibapt-pkg5.0:i386 ]
  42. Remv elibapt-pkg5.0 [1.1~exp9]
  43. Conf eapt (1.0.10.1 unstable [all])' apt install -s eapt=1.0.10.1
  44. # Check with the APT name, aka essential
  45. testsuccessequal 'Reading package lists...
  46. Building dependency tree...
  47. The following packages will be REMOVED:
  48. libapt-pkg5.0
  49. The following packages will be DOWNGRADED:
  50. apt
  51. 0 upgraded, 0 newly installed, 1 downgraded, 1 to remove and 0 not upgraded.
  52. Inst apt [1.1~exp9] (1.0.10.1 unstable [all]) [libapt-pkg5.0:i386 on apt:i386] [libapt-pkg5.0:i386 ]
  53. Remv libapt-pkg5.0 [1.1~exp9]
  54. Conf apt (1.0.10.1 unstable [all])' apt install -s apt=1.0.10.1