You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

31 lines
742 B

  1. #!/bin/sh
  2. #
  3. # Test that packages from remote sources cannot set the Status field.
  4. #
  5. set -e
  6. TESTDIR=$(readlink -f $(dirname $0))
  7. . $TESTDIR/framework
  8. setupenvironment
  9. configarchitecture 'amd64'
  10. TMPDIR=$(readlink -f .)
  11. insertpackage 'unstable' 'pretends-installed' 'all' '1' 'Status: install ok installed'
  12. insertinstalledpackage 'really-installed' 'all' '1'
  13. setupaptarchive
  14. testequal "pretends-installed:
  15. Installed: (none)
  16. Candidate: 1
  17. Version table:
  18. 1 0
  19. 500 file:${TMPDIR}/aptarchive/ unstable/main amd64 Packages" aptcache policy pretends-installed
  20. testequal "really-installed:
  21. Installed: 1
  22. Candidate: 1
  23. Version table:
  24. *** 1 0
  25. 100 ${TMPDIR}/rootdir/var/lib/dpkg/status" aptcache policy really-installed