]> git.saurik.com Git - apt.git/blob - test/integration/test-acquire-binary-all
review of new/changed translatable program strings
[apt.git] / test / integration / test-acquire-binary-all
1 #!/bin/sh
2 set -e
3
4 TESTDIR=$(readlink -f $(dirname $0))
5 . $TESTDIR/framework
6 setupenvironment
7 configarchitecture 'amd64'
8
9 buildsimplenativepackage 'foo-1' 'all' '2' 'unstable'
10 buildsimplenativepackage 'foo-2' 'amd64' '2' 'unstable'
11 setupaptarchive --no-update
12
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
17 testequal 'foo-1
18 foo-2' aptcache pkgnames foo-
19
20 listcurrentlistsdirectory > lists.before
21 testsuccess grep '_binary-all_Packages' lists.before
22
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)"
27 testequal 'foo-1
28 foo-2' aptcache pkgnames foo-
29
30 rm -rf rootdir/var/lib/apt/lists
31 msgmsg 'Releasefile with Architectures field but without all'
32 getarchitecturesfromreleasefile() { echo "$(getarchitectures)"; }
33 generatereleasefiles
34 signreleasefiles
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-
39
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-
45
46 rm -rf rootdir/var/lib/apt/lists
47 msgmsg 'Releasefile without Architectures field'
48 getarchitecturesfromreleasefile() { echo -n ''; }
49 generatereleasefiles
50 signreleasefiles
51 testsuccess apt update
52 cp rootdir/tmp/testsuccess.output aptupdate.output
53 testsuccess grep '^Get.* all Packages ' aptupdate.output
54 testequal 'foo-1
55 foo-2' aptcache pkgnames foo-
56
57 # apt doesn't know supported archs, so missing a configured arch is a failure
58 configarchitecture 'amd64' 'i386'
59 testfailure apt update
60 testequal 'foo-1
61 foo-2' aptcache pkgnames foo-
62
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
69 testequal 'foo-1
70 foo-2' aptcache pkgnames foo-