]> git.saurik.com Git - apt.git/blob - test/integration/test-different-methods-for-same-source
ensure filesize of deb is included in the hashes list
[apt.git] / test / integration / test-different-methods-for-same-source
1 #!/bin/sh
2 set -e
3
4 TESTDIR="$(readlink -f "$(dirname "$0")")"
5 . "$TESTDIR/framework"
6 setupenvironment
7 configarchitecture 'amd64'
8
9 insertpackage 'stable' 'foo' 'all' '1'
10 insertsource 'stable' 'foo' 'all' '1'
11 setupaptarchive --no-update
12
13 # install a slowed down file: otherwise its to fast to reproduce combining
14 NEWMETHODS="$(readlink -f rootdir)/usr/lib/apt/methods"
15 OLDMETHODS="$(readlink -f rootdir/usr/lib/apt/methods)"
16 rm "$NEWMETHODS"
17 mkdir "$NEWMETHODS"
18 backupIFS="$IFS"
19 IFS="$(printf "\n\b")"
20 for METH in $(find "$OLDMETHODS" ! -type d); do
21 ln -s "$OLDMETHODS/$(basename "$METH")" "$NEWMETHODS"
22 done
23 IFS="$backupIFS"
24 ln -s "${OLDMETHODS}/http" "${NEWMETHODS}/http-ng"
25
26 changetowebserver
27 sed -i -e 's# http:# http-ng:#' $(find rootdir/etc/apt/sources.list.d -name '*-deb-src.list')
28
29 testsuccess apt update
30 cp rootdir/tmp/testsuccess.output update.log
31 # all requests are folded into the first Release file
32 testsuccess grep ' http-ng://' update.log
33 testfailure grep ' http://' update.log