]> git.saurik.com Git - apt.git/blob - test/integration/test-bug-782777-single-arch-weirdness
correct cross & disappear progress detection
[apt.git] / test / integration / test-bug-782777-single-arch-weirdness
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
4 set -e
5
6 TESTDIR="$(readlink -f "$(dirname "$0")")"
7 . "$TESTDIR/framework"
8 setupenvironment
9 configarchitecture 'i386'
10
11 insertpackage 'unstable' 'abar' 'i386' '1'
12 insertpackage 'unstable' 'foobar' 'i386' '1' 'Depends: abar:amd64, zfoo:amd64'
13 insertpackage 'unstable' 'zfoo' 'i386' '1'
14
15 setupaptarchive
16
17 testrun() {
18 rm -f rootdir/var/lib/apt/extended_states
19
20 testequal 'Reading package lists...
21 Building dependency tree...
22 The following NEW packages will be installed:
23 abar zfoo
24 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
25 Inst abar (1 unstable [i386])
26 Inst zfoo (1 unstable [i386])
27 Conf abar (1 unstable [i386])
28 Conf zfoo (1 unstable [i386])' aptget install abar zfoo -s
29
30 testequal 'Reading package lists...
31 Building dependency tree...
32 The following NEW packages will be installed:
33 abar zfoo
34 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
35 Inst abar (1 unstable [i386])
36 Inst zfoo (1 unstable [i386])
37 Conf abar (1 unstable [i386])
38 Conf zfoo (1 unstable [i386])' aptget install abar:i386 zfoo:i386 -s
39
40 testequal "Reading package lists...
41 Building dependency tree...
42 Package abar:amd64 is not available, but is referred to by another package.
43 This may mean that the package is missing, has been obsoleted, or
44 is only available from another source
45
46 Package zfoo:amd64 is not available, but is referred to by another package.
47 This may mean that the package is missing, has been obsoleted, or
48 is only available from another source
49
50 E: Package 'abar:amd64' has no installation candidate
51 E: 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
58 zfoo' aptmark showmanual abar zfoo
59 testequal 'abar set to automatically installed.
60 zfoo set to automatically installed.' aptmark auto abar zfoo
61 testempty aptmark showmanual abar zfoo
62 testequal 'abar
63 zfoo' aptmark showauto abar zfoo
64
65 mv -f status.backup rootdir/var/lib/dpkg/status
66 }
67
68 msgmsg 'Single-Arch testrun'
69 testrun
70 msgmsg 'Multi-Arch testrun'
71 configarchitecture 'i386' 'amd64'
72 testrun