4 TESTDIR
=$(readlink -f $(dirname $0))
8 configarchitecture
"i386"
10 # try a little harder to create a size mismatch
11 buildsimplenativepackage
'pkga' 'all' '1.0' 'stable' "Depends: foo" '' '' '' '' 'none'
12 buildsimplenativepackage
'pkgb' 'all' '1.0' 'stable' "Depends: foo" '' '' '' '' 'none'
13 buildsimplenativepackage
'pkgc' 'all' '1.0' 'stable' "Depends: f$(for i in $(seq 0 1000); do printf 'o'; done)" '' '' '' '' 'none'
14 buildsimplenativepackage
'pkgd' 'all' '1.0' 'stable' "Depends: f$(for i in $(seq 0 1000); do printf 'o'; done)" '' '' '' '' 'none'
16 setupaptarchive
--no-update
18 # simulate (and be a predictable) pipeline mess-up by the server/proxy
20 -o 'aptwebserver::overwrite::.*pkga.*::filename=/pool/pkgd_1.0_all.deb' \
21 -o 'aptwebserver::overwrite::.*pkgc.*::filename=/pool/pkgb_1.0_all.deb' \
22 -o 'aptwebserver::overwrite::.*pkgb.*::filename=/pool/pkgc_1.0_all.deb' \
23 -o 'aptwebserver::overwrite::.*pkgd.*::filename=/pool/pkga_1.0_all.deb'
25 echo 'Debug::Acquire::http "true";
26 Debug::pkgAcquire::Worker "true";' > rootdir
/etc
/apt
/apt.conf.d
/99debug
28 testsuccess aptget update
30 # messup is bigger than pipeline: checks if fixup isn't trying to hard
31 testfailure aptget download pkga pkgb pkgc pkgd
-o Acquire
::http
::Pipeline
-Depth=2
32 testfailure
test -f pkga_1.0_all.deb
34 # ensure that pipeling is enabled for rest of this test
35 echo 'Acquire::http::Pipeline-Depth 10;' > rootdir
/etc
/apt
/apt.conf.d
/99enable-pipeline
37 # the output is a bit strange: it looks like it has downloaded pkga 4 times
38 testsuccess aptget download pkga pkgb pkgc pkgd
39 for pkg
in 'pkga' 'pkgb' 'pkgc' 'pkgd'; do
40 testsuccess
test -f ${pkg}_1.0_all.deb
41 testsuccess
cmp incoming
/${pkg}_1.0_all.deb
${pkg}_1.0_all.deb
42 rm -f ${pkg}_1.0_all.deb
45 # while hashes will pass (as none are available), sizes will not match, so failure
46 # checks that no hashes means that pipeline depth is ignored as we can't fixup
47 testfailure aptget download pkga pkgb pkgc pkgd
--allow-unauthenticated -o Acquire
::ForceHash
=ROT26