test-apt-cli-upgrade 974 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture "i386"
  7. insertpackage 'unstable' 'foo' 'all' '2.0' 'Depends: foo-new-dependency'
  8. insertpackage 'unstable' 'foo-new-dependency' 'all' '2.0'
  9. insertinstalledpackage 'foo' 'all' '1.0'
  10. setupaptarchive
  11. APTARCHIVE="$(readlink -f ./aptarchive)"
  12. # default is to allow new dependencies
  13. testsuccessequal "The following NEW packages will be installed:
  14. foo-new-dependency
  15. The following packages will be upgraded:
  16. foo
  17. 1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  18. Inst foo-new-dependency (2.0 unstable [all])
  19. Inst foo [1.0] (2.0 unstable [all])
  20. Conf foo-new-dependency (2.0 unstable [all])
  21. Conf foo (2.0 unstable [all])" apt upgrade -qq -s
  22. # ensure the 'old' way works as well
  23. testsuccessequal "The following packages have been kept back:
  24. foo
  25. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded." apt upgrade -qq -s --no-new-pkgs