]>
git.saurik.com Git - apt.git/blob - test/integration/test-bug-595691-empty-and-broken-archive-files
4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
7 configarchitecture "i386
"
10 touch aptarchive/Packages
14 rm -rf rootdir/var/lib/apt
15 testfailure aptget update --allow-insecure-repositories
16 testsuccess grep "^E
: Failed to fetch store
:${1} Empty files can
't be valid archives$" rootdir/tmp/testfailure.output
19 rm -rf rootdir/var/lib/apt
20 testwarning aptget update --allow-insecure-repositories
23 createemptyarchive() {
24 find aptarchive/ \( -name "Packages*" -o -name "en*" \) -type f -delete
25 touch aptarchive/Packages
26 echo -n "" | $COMPRESSOR_CMD > aptarchive/${1}.$COMPRESS
27 find aptarchive -name '*Release
*' -delete
28 rm -f aptarchive/Packages
32 find aptarchive/ \( -name "Packages*" -o -name "en*" \) -type f -delete
33 touch aptarchive/Packages aptarchive/${1}.$COMPRESS
34 find aptarchive -name '*Release
*' -delete
35 rm -f aptarchive/Packages
39 local APTARCHIVE="$(readlink -f ./aptarchive)"
42 msgmsg 'archive over
file' "Packages.$COMPRESS"
43 createemptyarchive 'Packages
'
45 createemptyfile 'Packages
'
46 failureupdate "$(readlink -f rootdir/var/lib/apt/lists/partial/$(echo "$APTARCHIVE" | sed -e 's#/#_#g')_Packages.${COMPRESS})"
52 msgmsg 'archive over http
' "Packages.$COMPRESS"
53 createemptyarchive 'Packages
'
55 createemptyfile 'Packages
'
56 failureupdate "$(readlink -f rootdir/var/lib/apt/lists/partial/localhost:${APTHTTPPORT}_Packages.${COMPRESS})"
59 forallsupportedcompressors testoverfile
61 # do the same again with http instead of file
64 forallsupportedcompressors testoverhttp