test-bug-753297-upgradable 828 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'i386'
  7. cat > rootdir/etc/apt/preferences <<EOF
  8. Package: *
  9. Pin: release testing
  10. Pin-Priority: 600
  11. Package: *
  12. Pin: release unstable
  13. Pin-Priority: 1
  14. EOF
  15. insertpackage 'testing,installed' 'foo' 'all' '1'
  16. insertpackage 'testing-updates' 'foo' 'all' '2'
  17. insertpackage 'unstable' 'foo' 'all' '3'
  18. insertinstalledpackage 'bar' 'all' '1'
  19. insertpackage 'testing' 'bar' 'all' '2'
  20. setupaptarchive
  21. testsuccessequal "Listing...
  22. bar/testing 2 all [upgradable from: 1]
  23. N: There is 1 additional version. Please use the '-a' switch to see it" apt list --upgradable
  24. testsuccessequal "Listing...
  25. bar/testing 2 all [upgradable from: 1]
  26. dpkg/now 1.16.2+fake all [installed,local]
  27. foo/testing,now 1 all [installed]" apt list