4 TESTDIR
=$(readlink -f $(dirname $0))
8 configarchitecture
"i386"
10 insertpackage
'unstable' 'apt' 'all' '1.0'
12 setupaptarchive
--no-update
15 # normal update works fine
16 testsuccess aptget update
18 # make InRelease really big
19 mv aptarchive
/dists
/unstable
/InRelease aptarchive
/dists
/unstable
/InRelease.good
20 dd if=/dev
/zero of
=aptarchive
/dists
/unstable
/InRelease bs
=1M count
=2
21 touch -d '+1hour' aptarchive
/dists
/unstable
/InRelease
22 aptget update
-o acquire
::MaxReleaseFileSize
=$((1*1000*1000))
25 # append junk at the end of the Packages.gz/Packages
26 SIZE
="$(stat --printf=%s aptarchive/dists/unstable/main/binary-i386/Packages)"
27 echo "1234567890" >> aptarchive
/dists
/unstable
/main
/binary
-i386/Packages.gz
28 echo "1234567890" >> aptarchive
/dists
/unstable
/main
/binary
-i386/Packages
29 NEW_SIZE
="$(stat --printf=%s aptarchive/dists/unstable/main/binary-i386/Packages)"
30 rm -f rootdir
/var
/lib
/apt
/lists
/localhost
*
31 testequal
"W: Failed to fetch http://localhost:8080/dists/unstable/main/binary-i386/Packages Writing more data than expected ($NEW_SIZE > $SIZE) [IP: ::1 8080]
33 E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update
-qq