]> git.saurik.com Git - apt.git/blob - test/integration/test-bug-686346-package-missing-architecture
test-apt-download-progress: Allow smaller progress change
[apt.git] / test / integration / test-bug-686346-package-missing-architecture
1 #!/bin/sh
2 set -e
3
4 TESTDIR=$(readlink -f $(dirname $0))
5 . $TESTDIR/framework
6 setupenvironment
7 configarchitecture 'amd64'
8
9 insertinstalledpackage 'pkgb' 'none' '1'
10 insertinstalledpackage 'pkgd' 'none' '1'
11 insertpackage 'unstable' 'pkga' 'amd64' '2' 'Depends: pkgb'
12 insertpackage 'unstable' 'pkgb' 'amd64' '2'
13 insertpackage 'unstable' 'pkgc' 'amd64' '1' 'Conflicts: pkgb'
14
15 setupaptarchive
16
17 testsuccessequal 'Reading package lists...
18 Building dependency tree...
19 The following packages will be REMOVED:
20 pkgb:none
21 The following NEW packages will be installed:
22 pkgc
23 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
24 Remv pkgb:none [1]
25 Inst pkgc (1 unstable [amd64])
26 Conf pkgc (1 unstable [amd64])' aptget install pkgc -s
27
28 testsuccessequal 'Reading package lists...
29 Building dependency tree...
30 The following additional packages will be installed:
31 pkgb
32 The following packages will be REMOVED:
33 pkgb:none
34 The following NEW packages will be installed:
35 pkga pkgb
36 0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
37 Remv pkgb:none [1]
38 Inst pkgb (2 unstable [amd64])
39 Inst pkga (2 unstable [amd64])
40 Conf pkgb (2 unstable [amd64])
41 Conf pkga (2 unstable [amd64])' aptget install pkga -s
42
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 …
46 testsuccessequal 'Reading package lists...
47 Building dependency tree...
48 Calculating upgrade...
49 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist-upgrade -s
50
51 # pkgd has no update with an architecture
52 testdpkginstalled pkgd
53 msgtest 'Test apt-get purge' 'pkgd'
54 testsuccess --nomsg aptget purge pkgd -y
55 testdpkgnotinstalled pkgd
56
57 # there is a pkgb with an architecture
58 testdpkginstalled pkgb
59 msgtest 'Test apt-get purge' 'pkgb:none'
60 testsuccess --nomsg aptget purge pkgb:none -y
61 testdpkgnotinstalled pkgb
62
63 # check that dependencies are created after the none package exists in the cache
64 rm rootdir/var/cache/apt/*.bin
65 insertinstalledpackage 'pkgb' 'none' '1'
66 insertinstalledpackage 'pkgf' 'none' '1' 'Conflicts: pkgb'
67 insertinstalledpackage 'pkgg' 'amd64' '1' 'Conflicts: pkgb'
68 insertinstalledpackage 'pkgb' 'amd64' '2'
69 testequalor2 "Reading package lists...
70 Building dependency tree...
71 Reading state information...
72 You might want to run 'apt-get -f install' to correct these.
73 The 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
80 E: Unmet dependencies. Try using -f." "Reading package lists...
81 Building dependency tree...
82 Reading state information...
83 You might want to run 'apt-get -f install' to correct these.
84 The 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
91 E: Unmet dependencies. Try using -f." aptget check
92
93 # check that dependencies are generated for none-packages
94 rm rootdir/var/lib/dpkg/status
95 insertinstalledpackage 'pkgx' 'none' '1'
96 insertinstalledpackage 'pkgy' 'none' '1' 'Depends: pkgz, pkgx (>= 1)'
97 insertinstalledpackage 'pkgz' 'none' '1'
98 testsuccessequal 'Reading package lists...
99 Building dependency tree...
100 Reading state information...
101 The following packages will be REMOVED:
102 pkgx:none* pkgy:none*
103 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
104 Purg pkgy:none [1]
105 Purg pkgx:none [1]' aptget purge pkgx -s
106 testsuccessequal 'Reading package lists...
107 Building dependency tree...
108 Reading state information...
109 The following packages will be REMOVED:
110 pkgy:none* pkgz:none*
111 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
112 Purg pkgy:none [1]
113 Purg pkgz:none [1]' aptget purge pkgz -s