test-apt-cli-upgrade 979 B

1234567891011121314151617181920212223242526272829303132333435
  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. testequal "Calculating upgrade... Done
  14. The following NEW packages will be installed:
  15. foo-new-dependency
  16. The following packages will be upgraded:
  17. foo
  18. 1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  19. Inst foo-new-dependency (2.0 unstable [all])
  20. Inst foo [1.0] (2.0 unstable [all])
  21. Conf foo-new-dependency (2.0 unstable [all])
  22. Conf foo (2.0 unstable [all])" apt upgrade -qq -s
  23. # ensure
  24. testequal "Calculating upgrade... Done
  25. The following packages have been kept back:
  26. foo
  27. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded." apt upgrade -qq -s --no-new-pkgs