4 TESTDIR
=$(readlink -f $(dirname $0))
7 configarchitecture
'amd64'
9 buildsimplenativepackage
'unrelated' 'all' '0.5~squeeze1' 'unstable'
11 setupaptarchive
--no-update
15 configallowinsecurerepositories
"${1:-false}"
17 rm -f rootdir
/var
/lib
/apt
/lists
/localhost
*
19 if [ "$1" = 'true' ]; then
20 testwarning aptget update
22 testsuccess aptget update
25 # ensure no leftovers in partial
26 testfailure
ls "rootdir/var/lib/apt/lists/partial/*"
28 # check that I-M-S header is kept in redirections
29 testequal
"$EXPECT" aptget update
-o Debug
::pkgAcquire
::Worker
=0 -o Debug
::Acquire
::http
=0
31 # ensure that we still do a hash check on ims hit
32 msgtest
'Test I-M-S' 'reverify'
33 aptget update
-o Debug
::pkgAcquire
::Auth
=1 2>&1 | grep -A2 'RecivedHash:' | grep -q -- '- SHA' && msgpass
|| msgfail
35 # ensure no leftovers in partial
36 testfailure
ls "rootdir/var/lib/apt/lists/partial/*"
40 EXPECT
="Hit http://localhost:8080 unstable InRelease
41 Hit http://localhost:8080 unstable/main Sources
42 Hit http://localhost:8080 unstable/main amd64 Packages
43 Hit http://localhost:8080 unstable/main Translation-en
44 Reading package lists..."
49 echo "Acquire::GzipIndexes "1";" > rootdir
/etc
/apt
/apt.conf.d
/02compressindex
52 msgmsg
"Release/Release.gpg"
53 # with Release/Release.gpg
54 EXPECT
="Ign http://localhost:8080 unstable InRelease
56 Hit http://localhost:8080 unstable Release
57 Hit http://localhost:8080 unstable Release.gpg
58 Hit http://localhost:8080 unstable/main Sources
59 Hit http://localhost:8080 unstable/main amd64 Packages
60 Hit http://localhost:8080 unstable/main Translation-en
61 Reading package lists..."
63 find aptarchive
-name 'InRelease' -delete
65 echo "Acquire::GzipIndexes "0";" > rootdir
/etc
/apt
/apt.conf.d
/02compressindex
68 echo "Acquire::GzipIndexes "1";" > rootdir
/etc
/apt
/apt.conf.d
/02compressindex
71 # no Release.gpg or InRelease
73 EXPECT
="Ign http://localhost:8080 unstable InRelease
75 Hit http://localhost:8080 unstable Release
76 Ign http://localhost:8080 unstable Release.gpg
78 Hit http://localhost:8080 unstable/main Sources
79 Hit http://localhost:8080 unstable/main amd64 Packages
80 Hit http://localhost:8080 unstable/main Translation-en
81 Reading package lists...
82 W: The data from 'http://localhost:8080 unstable Release.gpg' is not signed. Packages from that repository can not be authenticated."
84 find aptarchive
-name 'Release.gpg' -delete
86 echo "Acquire::GzipIndexes "0";" > rootdir
/etc
/apt
/apt.conf.d
/02compressindex
89 echo "Acquire::GzipIndexes "1";" > rootdir
/etc
/apt
/apt.conf.d
/02compressindex