]> git.saurik.com Git - apt.git/blob - test/integration/test-apt-update-empty-files
tests: activate dpkg multi-arch even if test is single arch
[apt.git] / test / integration / test-apt-update-empty-files
1 #!/bin/sh
2 set -e
3
4 TESTDIR="$(readlink -f "$(dirname "$0")")"
5 . "$TESTDIR/framework"
6
7 setupenvironment
8 configarchitecture 'amd64'
9 configcompression '.' 'gz'
10
11 insertpackage 'unstable' 'apt' 'amd64' '1'
12 # this automatically gives us an empty Sources file
13
14 setupaptarchive --no-update
15
16 msgmsg 'Test with file'
17 rm -rf rootdir/var/lib/apt/lists
18 testsuccess apt update -o Debug::pkgAcquire::Worker=1
19 cp rootdir/tmp/testsuccess.output apt.output
20 testfailure grep '%0a\(Alt\)\?Filename:%20/.*/Sources\(\.gz\)\?%0a' apt.output
21 testempty find rootdir/var/lib/apt/lists -name '*_Sources'
22
23 msgmsg 'Test with http'
24 changetowebserver
25 rm -rf rootdir/var/lib/apt/lists
26 testsuccess apt update -o Debug::pkgAcquire::Worker=1
27 cp rootdir/tmp/testsuccess.output apt.output
28 testfailure grep 'http:600.*Sources' apt.output
29 testempty find rootdir/var/lib/apt/lists -name '*_Sources'
30
31 msgmsg 'Test lists-cleanup on newly empty'
32 rm -rf rootdir/var/lib/apt/lists
33 insertsource 'unstable' 'apt' 'any' '1'
34 compressfile aptarchive/dists/unstable/main/source/Sources
35 generatereleasefiles
36 signreleasefiles
37 testsuccess apt update -o Debug::pkgAcquire::Worker=1
38 cp rootdir/tmp/testsuccess.output apt.output
39 testsuccess grep 'http:600.*Sources' apt.output
40 echo -n > aptarchive/dists/unstable/main/source/Sources
41 compressfile aptarchive/dists/unstable/main/source/Sources
42 generatereleasefiles 'now + 1hour'
43 signreleasefiles
44 testsuccess apt update -o Debug::pkgAcquire::Worker=1 -o APT::Get::List-Cleanup=0 -o Debug::Acquire::Transaction=1
45 cp rootdir/tmp/testsuccess.output apt.output
46 testfailure grep 'http:600.*Sources' apt.output
47 testempty find rootdir/var/lib/apt/lists -name '*_Sources'