]> git.saurik.com Git - apt.git/blame - test/integration/test-bug-596498-trusted-unsigned-repo
adapt to the new CacheSetHelper API
[apt.git] / test / integration / test-bug-596498-trusted-unsigned-repo
CommitLineData
4b42f43b
DK
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6setupenvironment
7configarchitecture 'i386'
8
9buildsimplenativepackage 'cool' 'i386' '1.0' 'unstable'
10
11setupaptarchive
12
13aptgetupdate() {
14 rm -rf rootdir/var/lib/apt/ rootdir/var/cache/apt/*.bin
15 aptget update -qq
16}
17
18PKGTEXT="$(aptget install cool --assume-no -d | head -n 7)"
19DEBFILE='rootdir/etc/apt/sources.list.d/apt-test-unstable-deb.list'
20
21testequal "$PKGTEXT
22Download complete and in download only mode" aptget install cool --assume-no -d
23
6c34ccca
DK
24testequal "$PKGTEXT
25Download complete and in download only mode" aptget install cool --assume-no -d --allow-unauthenticated
26
4b42f43b
DK
27sed -i -e 's#deb#deb [trusted=no]#' $DEBFILE
28aptgetupdate
29
30testequal "$PKGTEXT
31WARNING: The following packages cannot be authenticated!
32 cool
55732492 33Install these packages without verification? [y/N] N
4b42f43b
DK
34E: Some packages could not be authenticated" aptget install cool --assume-no -d
35
36find aptarchive/ \( -name 'Release.gpg' -o -name 'InRelease' \) -delete
37sed -i -e 's#deb \[trusted=no\]#deb#' $DEBFILE
38aptgetupdate
39
40testequal "$PKGTEXT
41WARNING: The following packages cannot be authenticated!
42 cool
55732492 43Install these packages without verification? [y/N] N
4b42f43b
DK
44E: Some packages could not be authenticated" aptget install cool --assume-no -d
45
6c34ccca
DK
46testequal "$PKGTEXT
47WARNING: The following packages cannot be authenticated!
48 cool
49Authentication warning overridden.
50Download complete and in download only mode" aptget install cool --assume-no -d --allow-unauthenticated
51
4b42f43b
DK
52sed -i -e 's#deb#deb [trusted=yes]#' $DEBFILE
53aptgetupdate
54
55testequal "$PKGTEXT
56Download complete and in download only mode" aptget install cool --assume-no -d