test-bug-829651 704 B

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'amd64'
  7. if [ "$(id -u)" = '0' ]; then
  8. msgskip 'Tests for unreadable files do not work as root'
  9. exit 0
  10. fi
  11. insertinstalledpackage 'foo' 'amd64' '1'
  12. insertpackage 'unstable' 'foo' 'amd64' '2'
  13. setupaptarchive
  14. testsuccess aptget indextargets
  15. aptget clean
  16. chmod -r rootdir/var/lib/dpkg/status
  17. testfailureequal "E: Could not open file ${TMPWORKINGDIRECTORY}/rootdir/var/lib/dpkg/status - open (13: Permission denied)
  18. E: Problem opening ${TMPWORKINGDIRECTORY}/rootdir/var/lib/dpkg/status
  19. E: The package lists or status file could not be parsed or opened." aptget indextargets