4 TESTDIR
=$(readlink -f $(dirname $0))
7 configarchitecture
'amd64'
9 buildsimplenativepackage
'unrelated' 'all' '0.5~squeeze1' 'unstable'
15 rm -f rootdir
/var
/lib
/apt
/lists
/localhost
*
17 testsuccess aptget update
19 # ensure no leftovers in partial
20 testfailure
ls "rootdir/var/lib/apt/lists/partial/*"
22 # check that I-M-S header is kept in redirections
23 testequal
"$EXPECT" aptget update
-o Debug
::pkgAcquire
::Worker
=0 -o Debug
::Acquire
::http
=0
25 # ensure that we still do a hash check on ims hit
26 msgtest
'Test I-M-S reverify'
27 aptget update
-o Debug
::pkgAcquire
::Auth
=1 2>&1 | grep -A1 'RecivedHash:' | grep -q -- '- SHA' && msgpass
|| msgfail
29 # ensure no leftovers in partial
30 testfailure
ls "rootdir/var/lib/apt/lists/partial/*"
34 EXPECT
="Hit http://localhost:8080 unstable InRelease
35 Hit http://localhost:8080 unstable/main Sources
36 Hit http://localhost:8080 unstable/main amd64 Packages
37 Hit http://localhost:8080 unstable/main Translation-en
38 Reading package lists..."
43 echo "Acquire::GzipIndexes "1";" > rootdir
/etc
/apt
/apt.conf.d
/02compressindex
46 msgmsg
"Release/Release.gpg"
47 # with Release/Release.gpg
48 EXPECT
="Ign http://localhost:8080 unstable InRelease
49 Hit http://localhost:8080 unstable Release
50 Hit http://localhost:8080 unstable Release.gpg
51 Hit http://localhost:8080 unstable/main Sources
52 Hit http://localhost:8080 unstable/main amd64 Packages
53 Hit http://localhost:8080 unstable/main Translation-en
54 Reading package lists..."
56 find aptarchive
-name "InRelease" | xargs rm -f
58 echo "Acquire::GzipIndexes "0";" > rootdir
/etc
/apt
/apt.conf.d
/02compressindex
61 echo "Acquire::GzipIndexes "1";" > rootdir
/etc
/apt
/apt.conf.d
/02compressindex
65 # no Release.gpg or InRelease
67 EXPECT
="Ign http://localhost:8080 unstable InRelease
68 Hit http://localhost:8080 unstable Release
69 Ign http://localhost:8080 unstable Release.gpg
70 Hit http://localhost:8080 unstable/main Sources
71 Hit http://localhost:8080 unstable/main amd64 Packages
72 Hit http://localhost:8080 unstable/main Translation-en
73 Reading package lists..."
75 find aptarchive
-name "Release.gpg" | xargs rm -f
77 echo 'Acquire::AllowInsecureRepositories "1";' > rootdir
/etc
/apt
/apt.conf.d
/insecure.conf
78 echo "Acquire::GzipIndexes "0";" > rootdir
/etc
/apt
/apt.conf.d
/02compressindex
81 echo "Acquire::GzipIndexes "1";" > rootdir
/etc
/apt
/apt.conf.d
/02compressindex