4 # ensure that an update will only succeed entirely or not at all
6 TESTDIR
=$(readlink -f $(dirname $0))
10 configarchitecture
'i386'
12 insertpackage
'unstable' 'foo' 'all' '1.0'
13 insertsource
'unstable' 'foo' 'all' '1.0'
15 setupaptarchive
--no-update
29 testequal
"$(cat $1)" ls rootdir
/var
/lib
/apt
/lists
33 # produce an unsigned repository
34 find aptarchive \
( -name 'Release.gpg' -o -name 'InRelease' \
) -delete
35 testfailure aptget update
--no-allow-insecure-repositories
41 breakfile aptarchive
/dists
/unstable
/main
/binary
-i386/Packages
42 testfailure aptget update
44 restorefile aptarchive
/dists
/unstable
/main
/binary
-i386/Packages
46 breakfile aptarchive
/dists
/unstable
/main
/source
/Sources
47 testfailure aptget update
49 restorefile aptarchive
/dists
/unstable
/main
/source
/Sources
53 msgmsg
'Test with no initial data over' "$1"
54 rm -rf rootdir
/var
/lib
/apt
/lists
55 mkdir -p rootdir
/var
/lib
/apt
/lists
/partial
56 ls rootdir
/var
/lib
/apt
/lists
> listsdir.lst
57 testrun
'listsdir.lst'
59 msgmsg
'Test with initial data over' "$1"
60 testsuccess aptget update
61 ls rootdir
/var
/lib
/apt
/lists
> listsdir.lst
62 testrun
'listsdir.lst'