test-apt-get-update-unauth-warning 852 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/sh
  2. #
  3. # ensure we print warnings for unauthenticated repositories
  4. #
  5. set -e
  6. TESTDIR=$(readlink -f $(dirname $0))
  7. . $TESTDIR/framework
  8. setupenvironment
  9. configarchitecture "i386"
  10. # a "normal" package with source and binary
  11. buildsimplenativepackage 'foo' 'all' '2.0'
  12. setupaptarchive --no-update
  13. APTARCHIVE=$(readlink -f ./aptarchive)
  14. rm -f $APTARCHIVE/dists/unstable/*Release*
  15. # update without authenticated InRelease file
  16. testequal "Ign file: unstable InRelease
  17. Ign file: unstable Release
  18. Reading package lists...
  19. W: The data from 'file: unstable Release' is not signed. Packages from that repository can not be authenticated." aptget update
  20. # ensure we can not install the package
  21. testequal "WARNING: The following packages cannot be authenticated!
  22. foo
  23. E: There are problems and -y was used without --force-yes" aptget install -qq -y foo