]> git.saurik.com Git - apt.git/blame - test/integration/test-acquire-binary-all
support setting empty values (sanely) & removing support for
[apt.git] / test / integration / test-acquire-binary-all
CommitLineData
1dd20368
DK
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6setupenvironment
7configarchitecture 'amd64'
8
9buildsimplenativepackage 'foo-1' 'all' '2' 'unstable'
10buildsimplenativepackage 'foo-2' 'amd64' '2' 'unstable'
11setupaptarchive --no-update
12
13msgmsg 'Releasefile with Architectures field and all included'
14testsuccess apt update
15cp rootdir/tmp/testsuccess.output aptupdate.output
16testsuccess grep '^Get.* all Packages ' aptupdate.output
17testequal 'foo-1
18foo-2' aptcache pkgnames foo-
19
20listcurrentlistsdirectory > lists.before
21testsuccess grep '_binary-all_Packages' lists.before
22
23configarchitecture 'amd64' 'i386'
24testsuccessequal "All packages are up to date.
25N: 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
26testfileequal lists.before "$(listcurrentlistsdirectory)"
27testequal 'foo-1
28foo-2' aptcache pkgnames foo-
29
30rm -rf rootdir/var/lib/apt/lists
31msgmsg 'Releasefile with Architectures field but without all'
32getarchitecturesfromreleasefile() { echo "$(getarchitectures)"; }
33generatereleasefiles
34signreleasefiles
35testsuccessequal "All packages are up to date.
36N: 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
37cp rootdir/tmp/testsuccess.output aptupdate.output
38testfailure grep '^Get.* all Packages ' aptupdate.output
39testequal 'foo-2' aptcache pkgnames foo-
40
41configarchitecture 'amd64'
42testsuccess apt update
43cp rootdir/tmp/testsuccess.output aptupdate.output
44testfailure grep '^Get.* all Packages ' aptupdate.output
45testequal 'foo-2' aptcache pkgnames foo-
46
47rm -rf rootdir/var/lib/apt/lists
48msgmsg 'Releasefile without Architectures field'
49getarchitecturesfromreleasefile() { echo -n ''; }
50generatereleasefiles
51signreleasefiles
52testsuccess apt update
53cp rootdir/tmp/testsuccess.output aptupdate.output
54testsuccess grep '^Get.* all Packages ' aptupdate.output
55testequal 'foo-1
56foo-2' aptcache pkgnames foo-
57
58# apt doesn't know supported archs, so missing a configured arch is a failure
59configarchitecture 'amd64' 'i386'
60testfailure apt update -q=0
61testequal 'foo-1
62foo-2' aptcache pkgnames foo-
63
64msgmsg 'No Releasefile'
65rm -rf rootdir/var/lib/apt/lists
66find aptarchive -name '*Release*' -delete
67configarchitecture 'amd64'
68testfailure apt update
69testwarning apt update --allow-insecure-repositories
70testequal 'foo-1
71foo-2' aptcache pkgnames foo-