]> git.saurik.com Git - apt.git/blame_incremental - test/integration/test-apt-get-update-unauth-warning
use _apt:root only for partial directories
[apt.git] / test / integration / test-apt-get-update-unauth-warning
... / ...
CommitLineData
1#!/bin/sh
2#
3# ensure we print warnings for unauthenticated repositories
4#
5set -e
6
7TESTDIR=$(readlink -f $(dirname $0))
8. $TESTDIR/framework
9
10setupenvironment
11configarchitecture "i386"
12
13# a "normal" package with source and binary
14buildsimplenativepackage 'foo' 'all' '2.0'
15
16setupaptarchive --no-update
17
18APTARCHIVE=$(readlink -f ./aptarchive)
19rm -f $APTARCHIVE/dists/unstable/*Release*
20
21# update without authenticated files leads to warning
22testequal "Ign file: unstable InRelease
23Err file: unstable Release
24
25W: The repository 'file: unstable Release' does not have a Release file. This is deprecated, please contact the owner of the repository.
26W: Use --allow-insecure-repositories to force the update
27W: Failed to fetch file:$APTARCHIVE/dists/unstable/Release
28
29E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update
30
31# no package foo
32testequal "Listing..." apt list foo
33testequal "partial" ls rootdir/var/lib/apt/lists
34
35# allow override
36testequal "Ign file: unstable InRelease
37Ign file: unstable Release
38Reading package lists...
39W: The repository 'file: unstable Release' does not have a Release file. This is deprecated, please contact the owner of the repository." aptget update --allow-insecure-repositories
40# ensure we can not install the package
41testequal "WARNING: The following packages cannot be authenticated!
42 foo
43E: There are problems and -y was used without --force-yes" aptget install -qq -y foo