]>
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 8)"
19 DOWNLOG
="$(echo "$PKGTEXT" | tail -n 1)"
20 PKGTEXT
="$(echo "$PKGTEXT" | head -n 7)"
21 DEBFILE
='rootdir/etc/apt/sources.list.d/apt-test-unstable-*.list'
23 testsuccessequal
"$PKGTEXT
25 Download complete and in download only mode" aptget
install cool
--assume-no -d
27 testsuccessequal
"$PKGTEXT
29 Download complete and in download only mode" aptget
install cool
--assume-no -d --allow-unauthenticated
31 sed -i -e 's#\(deb\(-src\)\?\) #\1 [trusted=no] #' $DEBFILE
32 aptgetupdate
'testsuccess'
34 testfailureequal
"$PKGTEXT
35 WARNING: The following packages cannot be authenticated!
37 Install these packages without verification? [y/N] N
38 E: Some packages could not be authenticated" aptget
install cool
--assume-no -d
40 configarchitecture
'amd64' 'i386'
41 testequal
"$(echo "$PKGTEXT" | sed 's#cool$#cool:i386#g')
42 WARNING: The following packages cannot be authenticated!
44 Authentication warning overridden.
46 Download complete and in download only mode" aptget
install cool
:i386
--assume-no -d --allow-unauthenticated
47 configarchitecture
'i386'
49 find aptarchive
/ \
( -name 'Release.gpg' -o -name 'InRelease' \
) -delete
50 sed -i -e 's#\(deb\(-src\)\?\) \[trusted=no\] #\1 #' $DEBFILE
53 testfailureequal
"$PKGTEXT
54 WARNING: The following packages cannot be authenticated!
56 Install these packages without verification? [y/N] N
57 E: Some packages could not be authenticated" aptget
install cool
--assume-no -d
59 testsuccessequal
"$PKGTEXT
60 WARNING: The following packages cannot be authenticated!
62 Authentication warning overridden.
64 Download complete and in download only mode" aptget
install cool
--assume-no -d --allow-unauthenticated
66 sed -i -e 's#\(deb\(-src\)\?\) #\1 [trusted=yes] #' $DEBFILE
69 testsuccessequal
"$PKGTEXT
71 Download complete and in download only mode" aptget
install cool
--assume-no -d