summaryrefslogtreecommitdiffstats
path: root/test/integration/test-bug-686346-package-missing-architecture
blob: a064e5d73661415c317080fb46ac4d9716fbcadd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/bin/sh
set -e

TESTDIR="$(readlink -f "$(dirname "$0")")"
. "$TESTDIR/framework"
setupenvironment
allowremovemanual
configarchitecture 'amd64'

insertinstalledpackage 'pkgb' 'none' '1'
insertinstalledpackage 'pkgd' 'none' '1'
insertpackage 'unstable' 'pkga' 'amd64' '2' 'Depends: pkgb'
insertpackage 'unstable' 'pkgb' 'amd64' '2'
insertpackage 'unstable' 'pkgc' 'amd64' '1' 'Conflicts: pkgb'

setupaptarchive

testsuccessequal 'Reading package lists...
Building dependency tree...
The following packages will be REMOVED:
  pkgb:none
The following NEW packages will be installed:
  pkgc
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
Remv pkgb:none [1]
Inst pkgc (1 unstable [amd64])
Conf pkgc (1 unstable [amd64])' aptget install pkgc -s

testsuccessequal 'Reading package lists...
Building dependency tree...
The following additional packages will be installed:
  pkgb
The following packages will be REMOVED:
  pkgb:none
The following NEW packages will be installed:
  pkga pkgb
0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
Remv pkgb:none [1]
Inst pkgb (2 unstable [amd64])
Inst pkga (2 unstable [amd64])
Conf pkgb (2 unstable [amd64])
Conf pkga (2 unstable [amd64])' aptget install pkga -s

# do not automatically change from none-arch to whatever-arch as
# this breaks other none packages and dpkg has this ruleset as
# this difference seems so important that it has to be maintained …
testsuccessequal 'Reading package lists...
Building dependency tree...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist-upgrade -s

# pkgd has no update with an architecture
testdpkginstalled pkgd
msgtest 'Test apt-get purge' 'pkgd'
testsuccess --nomsg aptget purge pkgd -y
testdpkgnotinstalled pkgd

# there is a pkgb with an architecture
testdpkginstalled pkgb
msgtest 'Test apt-get purge' 'pkgb:none'
testsuccess --nomsg aptget purge pkgb:none -y
testdpkgnotinstalled pkgb

# check that dependencies are created after the none package exists in the cache
rm rootdir/var/cache/apt/*.bin
insertinstalledpackage 'pkgb' 'none' '1'
insertinstalledpackage 'pkgf' 'none' '1' 'Conflicts: pkgb'
insertinstalledpackage 'pkgg' 'amd64' '1' 'Conflicts: pkgb'
insertinstalledpackage 'pkgb' 'amd64' '2'
testequalor2 "Reading package lists...
Building dependency tree...
Reading state information...
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 pkgb : Conflicts: pkgb:none but 1 is installed
 pkgb:none : Conflicts: pkgb but 2 is installed
 pkgf:none : Conflicts: pkgb:none but 1 is installed
             Conflicts: pkgb but 2 is installed
 pkgg : Conflicts: pkgb but 2 is installed
        Conflicts: pkgb:none but 1 is installed
E: Unmet dependencies. Try using --fix-broken." "Reading package lists...
Building dependency tree...
Reading state information...
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 pkgb : Conflicts: pkgb:none but 1 is installed
 pkgb:none : Conflicts: pkgb but 2 is installed
 pkgf:none : Conflicts: pkgb but 2 is installed
             Conflicts: pkgb:none but 1 is installed
 pkgg : Conflicts: pkgb but 2 is installed
        Conflicts: pkgb:none but 1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution)." aptget check

# check that dependencies are generated for none-packages
rm rootdir/var/lib/dpkg/status
insertinstalledpackage 'pkgx' 'none' '1'
insertinstalledpackage 'pkgy' 'none' '1' 'Depends: pkgz, pkgx (>= 1)'
insertinstalledpackage 'pkgz' 'none' '1'
testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
  pkgx:none* pkgy:none*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
Purg pkgy:none [1]
Purg pkgx:none [1]' aptget purge pkgx -s
testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
  pkgy:none* pkgz:none*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
Purg pkgy:none [1]
Purg pkgz:none [1]' aptget purge pkgz -s