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 -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.
' apt update -o quiet::NoProgress=1
36 cp rootdir/tmp/testsuccess.output aptupdate.output
37 testfailure grep '^Get.
* all Packages
' aptupdate.output
38 testequal 'foo
-2' aptcache pkgnames foo-
40 configarchitecture 'amd64
'
41 testsuccess apt update
42 cp rootdir/tmp/testsuccess.output aptupdate.output
43 testfailure grep '^Get.
* all Packages
' aptupdate.output
44 testequal 'foo
-2' aptcache pkgnames foo-
46 rm -rf rootdir/var/lib/apt/lists
47 msgmsg 'Releasefile without Architectures field
'
48 getarchitecturesfromreleasefile() { echo -n ''; }
51 testsuccess apt update
52 cp rootdir/tmp/testsuccess.output aptupdate.output
53 testsuccess grep '^Get.
* all Packages
' aptupdate.output
55 foo
-2' aptcache pkgnames foo-
57 # apt doesn't know supported archs
, so missing a configured arch is a failure
58 configarchitecture
'amd64' 'i386'
59 testfailure apt update
61 foo-2' aptcache pkgnames foo
-
63 msgmsg
'No Releasefile'
64 rm -rf rootdir
/var
/lib
/apt
/lists
65 find aptarchive
-name '*Release*' -delete
66 configarchitecture
'amd64'
67 testfailure apt update
68 testwarning apt update
--allow-insecure-repositories
70 foo-2' aptcache pkgnames foo
-