Merge branch 'debian/sid' into feature/apt-manpage
[ntk/apt.git] / test / integration / test-bug-680041-apt-mark-holds-correctly
CommitLineData
b855a400
DK
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6setupenvironment
7configarchitecture 'amd64'
8
9insertinstalledpackage 'pkgarch' 'amd64' '1'
10insertinstalledpackage 'pkgall' 'all' '1'
11
12insertpackage 'unstable' 'pkgarch' 'amd64' '2'
13insertpackage 'unstable' 'pkgall' 'all' '2'
14
15setupaptarchive
16
17runtests() {
18 testempty aptmark showhold
19
20 testequal 'Reading package lists...
21Building dependency tree...
22The following packages will be upgraded:
23 pkgall pkgarch
242 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
25After this operation, 0 B of additional disk space will be used.
26E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only
27
28 testequal 'pkgarch set on hold.' aptmark hold pkgarch
29 testequal 'pkgarch' aptmark showhold
30
31 testequal 'Reading package lists...
32Building dependency tree...
33The following packages have been kept back:
34 pkgarch
35The following packages will be upgraded:
36 pkgall
371 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
38After this operation, 0 B of additional disk space will be used.
39E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only
40
41 testequal 'Canceled hold on pkgarch.' aptmark unhold pkgarch
42 testempty aptmark showhold
43
44 testequal 'Reading package lists...
45Building dependency tree...
46The following packages will be upgraded:
47 pkgall pkgarch
482 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
49After this operation, 0 B of additional disk space will be used.
50E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only
51
52 testequal 'pkgall set on hold.' aptmark hold pkgall
53 testequal 'pkgall' aptmark showhold
54
55 testequal 'Reading package lists...
56Building dependency tree...
57The following packages have been kept back:
58 pkgall
59The following packages will be upgraded:
60 pkgarch
611 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
62After this operation, 0 B of additional disk space will be used.
63E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only
64
65 testequal 'Canceled hold on pkgall.' aptmark unhold pkgall
66 testempty aptmark showhold
67}
68# single-arch
69runtests
70# multi-arch
71configarchitecture 'amd64' 'i386'
72runtests