4 TESTDIR
=$(readlink -f $(dirname $0))
7 configarchitecture
'amd64'
9 buildsimplenativepackage
'foo-1' 'all' '2' 'unstable'
10 buildsimplenativepackage
'foo-2' 'amd64' '2' 'unstable'
11 setupaptarchive
--no-update
13 msgmsg
'Releasefile with Architectures field and all included'
14 testsuccess apt update
15 cp rootdir
/tmp
/testsuccess.output aptupdate.output
16 testsuccess
grep '^Get.* all Packages ' aptupdate.output
18 foo-2' aptcache pkgnames foo
-
20 listcurrentlistsdirectory
> lists.before
21 testsuccess
grep '_binary-all_Packages' lists.before
23 configarchitecture
'amd64' 'i386'
24 testsuccessequal
"All packages are up to date.
25 N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'file:$(readlink -f ./aptarchive) unstable InRelease' doesn't support architecture 'i386'" apt update
-q=0 -o quiet
::NoProgress
=1
26 testfileequal lists.before
"$(listcurrentlistsdirectory)"
28 foo-2' aptcache pkgnames foo
-
30 rm -rf rootdir
/var
/lib
/apt
/lists
31 msgmsg
'Releasefile with Architectures field but without all'
32 getarchitecturesfromreleasefile
() { echo "$(getarchitectures)"; }
35 testsuccessequal
"All packages are up to date.
36 N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'file:$(readlink -f ./aptarchive) unstable InRelease' doesn't support architecture 'i386'" apt update
-q=0 -o quiet
::NoProgress
=1
37 cp rootdir
/tmp
/testsuccess.output aptupdate.output
38 testfailure
grep '^Get.* all Packages ' aptupdate.output
39 testequal
'foo-2' aptcache pkgnames foo
-
41 configarchitecture
'amd64'
42 testsuccess apt update
43 cp rootdir
/tmp
/testsuccess.output aptupdate.output
44 testfailure
grep '^Get.* all Packages ' aptupdate.output
45 testequal
'foo-2' aptcache pkgnames foo
-
47 rm -rf rootdir
/var
/lib
/apt
/lists
48 msgmsg
'Releasefile without Architectures field'
49 getarchitecturesfromreleasefile
() { echo -n ''; }
52 testsuccess apt update
53 cp rootdir
/tmp
/testsuccess.output aptupdate.output
54 testsuccess
grep '^Get.* all Packages ' aptupdate.output
56 foo-2' aptcache pkgnames foo
-
58 # apt doesn't know supported archs, so missing a configured arch is a failure
59 configarchitecture
'amd64' 'i386'
60 testfailure apt update
-q=0
62 foo-2' aptcache pkgnames foo
-
64 msgmsg
'No Releasefile'
65 rm -rf rootdir
/var
/lib
/apt
/lists
66 find aptarchive
-name '*Release*' -delete
67 configarchitecture
'amd64'
68 testfailure apt update
69 testwarning apt update
--allow-insecure-repositories
71 foo-2' aptcache pkgnames foo
-