]> git.saurik.com Git - apt.git/blame - test/integration/test-bug-686346-package-missing-architecture
don't install new deps of candidates for kept back pkgs
[apt.git] / test / integration / test-bug-686346-package-missing-architecture
CommitLineData
c919ad6e
DK
1#!/bin/sh
2set -e
3
3abb6a6a
DK
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
c919ad6e
DK
6setupenvironment
7configarchitecture 'amd64'
8
9insertinstalledpackage 'pkgb' 'none' '1'
10insertinstalledpackage 'pkgd' 'none' '1'
11insertpackage 'unstable' 'pkga' 'amd64' '2' 'Depends: pkgb'
12insertpackage 'unstable' 'pkgb' 'amd64' '2'
13insertpackage 'unstable' 'pkgc' 'amd64' '1' 'Conflicts: pkgb'
c919ad6e
DK
14
15setupaptarchive
16
25b86db1 17testsuccessequal 'Reading package lists...
c919ad6e
DK
18Building dependency tree...
19The following packages will be REMOVED:
20 pkgb:none
21The following NEW packages will be installed:
22 pkgc
230 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
24Remv pkgb:none [1]
25Inst pkgc (1 unstable [amd64])
26Conf pkgc (1 unstable [amd64])' aptget install pkgc -s
27
25b86db1 28testsuccessequal 'Reading package lists...
c919ad6e 29Building dependency tree...
e7ebb414 30The following additional packages will be installed:
c919ad6e
DK
31 pkgb
32The following packages will be REMOVED:
33 pkgb:none
34The following NEW packages will be installed:
35 pkga pkgb
360 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
37Remv pkgb:none [1]
38Inst pkgb (2 unstable [amd64])
39Inst pkga (2 unstable [amd64])
40Conf pkgb (2 unstable [amd64])
41Conf pkga (2 unstable [amd64])' aptget install pkga -s
42
c919ad6e
DK
43# do not automatically change from none-arch to whatever-arch as
44# this breaks other none packages and dpkg has this ruleset as
45# this difference seems so important that it has to be maintained …
25b86db1 46testsuccessequal 'Reading package lists...
c919ad6e 47Building dependency tree...
2a884c61 48Calculating upgrade...
c919ad6e
DK
490 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist-upgrade -s
50
51# pkgd has no update with an architecture
52testdpkginstalled pkgd
53msgtest 'Test apt-get purge' 'pkgd'
0440d936 54testsuccess --nomsg aptget purge pkgd -y
c919ad6e
DK
55testdpkgnotinstalled pkgd
56
57# there is a pkgb with an architecture
58testdpkginstalled pkgb
59msgtest 'Test apt-get purge' 'pkgb:none'
0440d936 60testsuccess --nomsg aptget purge pkgb:none -y
c919ad6e
DK
61testdpkgnotinstalled pkgb
62
63# check that dependencies are created after the none package exists in the cache
64rm rootdir/var/cache/apt/*.bin
65insertinstalledpackage 'pkgb' 'none' '1'
66insertinstalledpackage 'pkgf' 'none' '1' 'Conflicts: pkgb'
67insertinstalledpackage 'pkgg' 'amd64' '1' 'Conflicts: pkgb'
68insertinstalledpackage 'pkgb' 'amd64' '2'
18908589 69testequalor2 "Reading package lists...
c919ad6e
DK
70Building dependency tree...
71Reading state information...
72You might want to run 'apt-get -f install' to correct these.
73The following packages have unmet dependencies:
74 pkgb : Conflicts: pkgb:none but 1 is installed
75 pkgb:none : Conflicts: pkgb but 2 is installed
76 pkgf:none : Conflicts: pkgb:none but 1 is installed
77 Conflicts: pkgb but 2 is installed
78 pkgg : Conflicts: pkgb but 2 is installed
79 Conflicts: pkgb:none but 1 is installed
18908589
DK
80E: Unmet dependencies. Try using -f." "Reading package lists...
81Building dependency tree...
82Reading state information...
83You might want to run 'apt-get -f install' to correct these.
84The following packages have unmet dependencies:
85 pkgb : Conflicts: pkgb:none but 1 is installed
86 pkgb:none : Conflicts: pkgb but 2 is installed
87 pkgf:none : Conflicts: pkgb but 2 is installed
88 Conflicts: pkgb:none but 1 is installed
89 pkgg : Conflicts: pkgb but 2 is installed
90 Conflicts: pkgb:none but 1 is installed
c919ad6e 91E: Unmet dependencies. Try using -f." aptget check
7605509f
DK
92
93# check that dependencies are generated for none-packages
94rm rootdir/var/lib/dpkg/status
95insertinstalledpackage 'pkgx' 'none' '1'
96insertinstalledpackage 'pkgy' 'none' '1' 'Depends: pkgz, pkgx (>= 1)'
97insertinstalledpackage 'pkgz' 'none' '1'
25b86db1 98testsuccessequal 'Reading package lists...
7605509f
DK
99Building dependency tree...
100Reading state information...
101The following packages will be REMOVED:
102 pkgx:none* pkgy:none*
1030 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
104Purg pkgy:none [1]
105Purg pkgx:none [1]' aptget purge pkgx -s
25b86db1 106testsuccessequal 'Reading package lists...
7605509f
DK
107Building dependency tree...
108Reading state information...
109The following packages will be REMOVED:
110 pkgy:none* pkgz:none*
1110 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
112Purg pkgy:none [1]
113Purg pkgz:none [1]' aptget purge pkgz -s