]> git.saurik.com Git - apt.git/blame - test/integration/test-bug-596498-trusted-unsigned-repo
* apt-pkg/cachefilter.cc:
[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
24sed -i -e 's#deb#deb [trusted=no]#' $DEBFILE
25aptgetupdate
26
27testequal "$PKGTEXT
28WARNING: The following packages cannot be authenticated!
29 cool
30Install these packages without verification [y/N]? N
31E: Some packages could not be authenticated" aptget install cool --assume-no -d
32
33find aptarchive/ \( -name 'Release.gpg' -o -name 'InRelease' \) -delete
34sed -i -e 's#deb \[trusted=no\]#deb#' $DEBFILE
35aptgetupdate
36
37testequal "$PKGTEXT
38WARNING: The following packages cannot be authenticated!
39 cool
40Install these packages without verification [y/N]? N
41E: Some packages could not be authenticated" aptget install cool --assume-no -d
42
43sed -i -e 's#deb#deb [trusted=yes]#' $DEBFILE
44aptgetupdate
45
46testequal "$PKGTEXT
47Download complete and in download only mode" aptget install cool --assume-no -d