4 TESTDIR
=$(readlink -f $(dirname $0))
7 configarchitecture
'i386'
9 buildsimplenativepackage
'cool' 'i386' '1.0' 'unstable'
11 setupaptarchive
--no-update
14 msgtest
'Test for existance of file' "$1"
15 test -e "$1" && msgpass
|| msgfail
20 msgtest
'Test for non-existance of file' "$1"
21 test -e "$1" && msgfail
|| msgpass
26 rm -rf rootdir
/var
/lib
/apt
27 testsuccess aptget update
29 testsuccess aptget download cool
30 testfileexists
'cool_1.0_i386.deb'
32 mv aptarchive
/pool
/cool_1.0_i386.deb aptarchive
/pool
/cool_1.0_i386.deb.bak
33 echo 'this is not a good package' > aptarchive
/pool
/cool_1.0_i386.deb
34 # FIXME: apt-get download should exit non-zero if download fails
36 testfilemissing cool_1.0_i386.deb
38 # FIXME: apt-get download should exit non-zero if download fails
39 aptget download cool
--allow-unauthenticated # unauthenticated doesn't mean unchecked
40 testfilemissing cool_1.0_i386.deb
42 rm -f aptarchive
/pool
/cool_1.0_i386.deb
43 mv aptarchive
/pool
/cool_1.0_i386.deb.bak aptarchive
/pool
/cool_1.0_i386.deb
44 testsuccess aptget download cool
--allow-unauthenticated
45 testfileexists
'cool_1.0_i386.deb'
50 find aptarchive
/ \
( -name 'Release.gpg' -o -name 'InRelease' \
) -delete
51 # FIXME: apt-get download should warn about untrusted downloads