test-bug-753297-upgradable 706 B

12345678910111213141516171819202122232425262728293031323334
  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]" apt list --upgradable
  23. testsuccessequal "Listing...
  24. bar/testing 2 all [upgradable from: 1]
  25. foo/testing,now 1 all [installed]" apt list