]>
git.saurik.com Git - apt.git/blob - test/integration/test-bug-596498-trusted-unsigned-repo
4 TESTDIR
=$(readlink -f $(dirname $0))
7 configarchitecture
'i386'
9 buildsimplenativepackage
'cool' 'i386' '1.0' 'unstable'
14 rm -rf rootdir
/var
/lib
/apt
/ rootdir
/var
/cache
/apt
/*.bin
15 ${1:-testwarning} aptget update
--allow-insecure-repositories
18 PKGTEXT
="$(aptget install cool --assume-no -d | head -n 7)"
19 DEBFILE
='rootdir/etc/apt/sources.list.d/apt-test-unstable-deb.list'
21 testsuccessequal
"$PKGTEXT
22 Download complete and in download only mode" aptget
install cool
--assume-no -d
24 testsuccessequal
"$PKGTEXT
25 Download complete and in download only mode" aptget
install cool
--assume-no -d --allow-unauthenticated
27 sed -i -e 's#deb#deb [trusted=no]#' $DEBFILE
28 aptgetupdate
'testsuccess'
30 testfailureequal
"$PKGTEXT
31 WARNING: The following packages cannot be authenticated!
33 Install these packages without verification? [y/N] N
34 E: Some packages could not be authenticated" aptget
install cool
--assume-no -d
36 find aptarchive
/ \
( -name 'Release.gpg' -o -name 'InRelease' \
) -delete
37 sed -i -e 's#deb \[trusted=no\]#deb#' $DEBFILE
40 testfailureequal
"$PKGTEXT
41 WARNING: The following packages cannot be authenticated!
43 Install these packages without verification? [y/N] N
44 E: Some packages could not be authenticated" aptget
install cool
--assume-no -d
46 testsuccessequal
"$PKGTEXT
47 WARNING: The following packages cannot be authenticated!
49 Authentication warning overridden.
50 Download complete and in download only mode" aptget
install cool
--assume-no -d --allow-unauthenticated
52 sed -i -e 's#deb#deb [trusted=yes]#' $DEBFILE
55 testsuccessequal
"$PKGTEXT
56 Download complete and in download only mode" aptget
install cool
--assume-no -d