]>
Commit | Line | Data |
---|---|---|
c4ffa042 MV |
1 | #!/bin/sh |
2 | # | |
3 | # ensure we print warnings for unauthenticated repositories | |
4 | # | |
5 | set -e | |
6 | ||
7 | TESTDIR=$(readlink -f $(dirname $0)) | |
8 | . $TESTDIR/framework | |
9 | ||
10 | setupenvironment | |
11 | configarchitecture "i386" | |
ff86d7df | 12 | configcompression '.' 'gz' |
c4ffa042 MV |
13 | |
14 | # a "normal" package with source and binary | |
15 | buildsimplenativepackage 'foo' 'all' '2.0' | |
16 | ||
17 | setupaptarchive --no-update | |
18 | ||
19 | APTARCHIVE=$(readlink -f ./aptarchive) | |
20 | rm -f $APTARCHIVE/dists/unstable/*Release* | |
21 | ||
bca84917 | 22 | # update without authenticated files leads to warning |
9d2a8a73 DK |
23 | testfailureequal "Get:1 file:$APTARCHIVE unstable InRelease |
24 | Ign:1 file:$APTARCHIVE unstable InRelease | |
4dbfe436 | 25 | File not found |
9d2a8a73 | 26 | Get:2 file:$APTARCHIVE unstable Release |
1eb1836f | 27 | Err:2 file:$APTARCHIVE unstable Release |
4dbfe436 | 28 | File not found |
1da3b7b8 | 29 | W: The repository 'file:$APTARCHIVE unstable Release' does not have a Release file. This is deprecated, please contact the owner of the repository. |
68ba0b7f | 30 | E: Use --allow-insecure-repositories to force the update" aptget update --no-allow-insecure-repositories |
bca84917 MV |
31 | |
32 | # no package foo | |
25b86db1 | 33 | testsuccessequal 'Listing...' apt list foo |
546dbfc8 DK |
34 | testequal 'lock |
35 | partial' ls rootdir/var/lib/apt/lists | |
bca84917 | 36 | |
ff86d7df | 37 | filesize() { |
c2a4a8dd | 38 | stat -c%s "$(aptget indextargets --no-release-info --format '$(URI)' "Created-By: $1" | cut -d'/' -f 3- ).gz" |
ff86d7df | 39 | } |
bca84917 | 40 | # allow override |
9d2a8a73 DK |
41 | #aptget update --allow-insecure-repositories -o Debug::pkgAcquire::worker=1 |
42 | #exit | |
43 | testwarningequal "Get:1 file:$APTARCHIVE unstable InRelease | |
44 | Ign:1 file:$APTARCHIVE unstable InRelease | |
4dbfe436 | 45 | File not found |
9d2a8a73 | 46 | Get:2 file:$APTARCHIVE unstable Release |
1eb1836f | 47 | Ign:2 file:$APTARCHIVE unstable Release |
4dbfe436 | 48 | File not found |
9d2a8a73 DK |
49 | Get:3 file:$APTARCHIVE unstable/main Sources |
50 | Ign:3 file:$APTARCHIVE unstable/main Sources | |
51 | File not found | |
52 | Get:4 file:$APTARCHIVE unstable/main i386 Packages | |
53 | Ign:4 file:$APTARCHIVE unstable/main i386 Packages | |
54 | File not found | |
55 | Get:5 file:$APTARCHIVE unstable/main Translation-en | |
56 | Ign:5 file:$APTARCHIVE unstable/main Translation-en | |
57 | File not found | |
58 | Get:3 file:$APTARCHIVE unstable/main Sources | |
59 | Ign:3 file:$APTARCHIVE unstable/main Sources | |
60 | File not found | |
61 | Get:4 file:$APTARCHIVE unstable/main i386 Packages | |
62 | Ign:4 file:$APTARCHIVE unstable/main i386 Packages | |
63 | File not found | |
64 | Get:5 file:$APTARCHIVE unstable/main Translation-en | |
65 | Ign:5 file:$APTARCHIVE unstable/main Translation-en | |
66 | File not found | |
67 | Get:3 file:$APTARCHIVE unstable/main Sources | |
68 | Ign:3 file:$APTARCHIVE unstable/main Sources | |
69 | File not found | |
70 | Get:4 file:$APTARCHIVE unstable/main i386 Packages | |
71 | Ign:4 file:$APTARCHIVE unstable/main i386 Packages | |
72 | File not found | |
73 | Get:5 file:$APTARCHIVE unstable/main Translation-en | |
74 | Ign:5 file:$APTARCHIVE unstable/main Translation-en | |
75 | File not found | |
1eb1836f DK |
76 | Get:3 file:$APTARCHIVE unstable/main Sources [$(filesize 'Sources') B] |
77 | Get:4 file:$APTARCHIVE unstable/main i386 Packages [$(filesize 'Packages') B] | |
78 | Get:5 file:$APTARCHIVE unstable/main Translation-en [$(filesize 'Translations') B] | |
bca84917 | 79 | Reading package lists... |
1da3b7b8 | 80 | W: The repository 'file:$APTARCHIVE unstable Release' does not have a Release file. This is deprecated, please contact the owner of the repository." aptget update --allow-insecure-repositories |
c4ffa042 | 81 | # ensure we can not install the package |
25b86db1 | 82 | testfailureequal "WARNING: The following packages cannot be authenticated! |
c4ffa042 | 83 | foo |
b381a482 | 84 | E: There were unauthenticated packages and -y was used without --allow-unauthenticated" aptget install -qq -y foo |