]> git.saurik.com Git - apt.git/blame - test/integration/test-bug-782777-single-arch-weirdness
fix testcase expecting incorrect remove log from dpkg
[apt.git] / test / integration / test-bug-782777-single-arch-weirdness
CommitLineData
6c9937da
DK
1#!/bin/sh
2# Ensure that the order in which packages are in the binary cache
3# does not effect if they can be found or not
4set -e
5
3abb6a6a
DK
6TESTDIR="$(readlink -f "$(dirname "$0")")"
7. "$TESTDIR/framework"
6c9937da
DK
8setupenvironment
9configarchitecture 'i386'
10
11insertpackage 'unstable' 'abar' 'i386' '1'
12insertpackage 'unstable' 'foobar' 'i386' '1' 'Depends: abar:amd64, zfoo:amd64'
13insertpackage 'unstable' 'zfoo' 'i386' '1'
14
15setupaptarchive
16
17testrun() {
18 rm -f rootdir/var/lib/apt/extended_states
19
20 testequal 'Reading package lists...
21Building dependency tree...
22The following NEW packages will be installed:
23 abar zfoo
240 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
25Inst abar (1 unstable [i386])
26Inst zfoo (1 unstable [i386])
27Conf abar (1 unstable [i386])
28Conf zfoo (1 unstable [i386])' aptget install abar zfoo -s
29
30 testequal 'Reading package lists...
31Building dependency tree...
32The following NEW packages will be installed:
33 abar zfoo
340 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
35Inst abar (1 unstable [i386])
36Inst zfoo (1 unstable [i386])
37Conf abar (1 unstable [i386])
38Conf zfoo (1 unstable [i386])' aptget install abar:i386 zfoo:i386 -s
39
40 testequal "Reading package lists...
41Building dependency tree...
42Package abar:amd64 is not available, but is referred to by another package.
43This may mean that the package is missing, has been obsoleted, or
44is only available from another source
45
46Package zfoo:amd64 is not available, but is referred to by another package.
47This may mean that the package is missing, has been obsoleted, or
48is only available from another source
49
50E: Package 'abar:amd64' has no installation candidate
51E: Package 'zfoo:amd64' has no installation candidate" aptget install abar:amd64 zfoo:amd64 -s
52
53 cp -f rootdir/var/lib/dpkg/status status.backup
54 insertinstalledpackage 'abar' 'i386' '1'
55 insertinstalledpackage 'zfoo' 'i386' '1'
56
57 testequal 'abar
58zfoo' aptmark showmanual abar zfoo
59 testequal 'abar set to automatically installed.
60zfoo set to automatically installed.' aptmark auto abar zfoo
61 testempty aptmark showmanual abar zfoo
62 testequal 'abar
63zfoo' aptmark showauto abar zfoo
64
65 mv -f status.backup rootdir/var/lib/dpkg/status
66}
67
68msgmsg 'Single-Arch testrun'
69testrun
70msgmsg 'Multi-Arch testrun'
71configarchitecture 'i386' 'amd64'
72testrun