]> git.saurik.com Git - apt.git/blame - test/integration/test-acquire-binary-all
tests: support spaces in path and TMPDIR
[apt.git] / test / integration / test-acquire-binary-all
CommitLineData
1dd20368
DK
1#!/bin/sh
2set -e
3
3abb6a6a
DK
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
1dd20368
DK
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.
87d6947d 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 -o quiet::NoProgress=1
1dd20368
DK
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
87d6947d 35testsuccessequal 'All packages are up to date.' apt update -o quiet::NoProgress=1
1dd20368
DK
36cp rootdir/tmp/testsuccess.output aptupdate.output
37testfailure grep '^Get.* all Packages ' aptupdate.output
38testequal 'foo-2' aptcache pkgnames foo-
39
40configarchitecture 'amd64'
41testsuccess apt update
42cp rootdir/tmp/testsuccess.output aptupdate.output
43testfailure grep '^Get.* all Packages ' aptupdate.output
44testequal 'foo-2' aptcache pkgnames foo-
45
46rm -rf rootdir/var/lib/apt/lists
47msgmsg 'Releasefile without Architectures field'
48getarchitecturesfromreleasefile() { echo -n ''; }
49generatereleasefiles
50signreleasefiles
51testsuccess apt update
52cp rootdir/tmp/testsuccess.output aptupdate.output
53testsuccess grep '^Get.* all Packages ' aptupdate.output
54testequal 'foo-1
55foo-2' aptcache pkgnames foo-
56
57# apt doesn't know supported archs, so missing a configured arch is a failure
58configarchitecture 'amd64' 'i386'
87d6947d 59testfailure apt update
1dd20368
DK
60testequal 'foo-1
61foo-2' aptcache pkgnames foo-
62
63msgmsg 'No Releasefile'
64rm -rf rootdir/var/lib/apt/lists
65find aptarchive -name '*Release*' -delete
66configarchitecture 'amd64'
67testfailure apt update
68testwarning apt update --allow-insecure-repositories
69testequal 'foo-1
70foo-2' aptcache pkgnames foo-