]> git.saurik.com Git - apt.git/blame - test/integration/test-bug-686346-package-missing-architecture
test/integration/test-essential-force-loopbreak: fix on non-amd64 systems
[apt.git] / test / integration / test-bug-686346-package-missing-architecture
CommitLineData
c919ad6e
DK
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
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'
14insertpackage 'unstable' 'pkge' 'none' '1'
15
16setupaptarchive
17
18testequal 'Reading package lists...
19Building dependency tree...
20The following packages will be REMOVED:
21 pkgb:none
22The following NEW packages will be installed:
23 pkgc
240 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
25Remv pkgb:none [1]
26Inst pkgc (1 unstable [amd64])
27Conf pkgc (1 unstable [amd64])' aptget install pkgc -s
28
29testequal 'Reading package lists...
30Building dependency tree...
31The following extra packages will be installed:
32 pkgb
33The following packages will be REMOVED:
34 pkgb:none
35The following NEW packages will be installed:
36 pkga pkgb
370 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
38Remv pkgb:none [1]
39Inst pkgb (2 unstable [amd64])
40Inst pkga (2 unstable [amd64])
41Conf pkgb (2 unstable [amd64])
42Conf pkga (2 unstable [amd64])' aptget install pkga -s
43
44# ensure that arch-less stanzas from Packages files are ignored
45msgtest 'Package is distributed in the Packages files' 'pkge'
46grep -q 'Package: pkge' $(find aptarchive -name 'Packages') && msgpass || msgfail
47testnopackage pkge
48testnopackage pkge:none
49testnopackage pkge:*
50
51# do not automatically change from none-arch to whatever-arch as
52# this breaks other none packages and dpkg has this ruleset as
53# this difference seems so important that it has to be maintained …
54testequal 'Reading package lists...
55Building dependency tree...
560 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist-upgrade -s
57
58# pkgd has no update with an architecture
59testdpkginstalled pkgd
60msgtest 'Test apt-get purge' 'pkgd'
0440d936 61testsuccess --nomsg aptget purge pkgd -y
c919ad6e
DK
62testdpkgnotinstalled pkgd
63
64# there is a pkgb with an architecture
65testdpkginstalled pkgb
66msgtest 'Test apt-get purge' 'pkgb:none'
0440d936 67testsuccess --nomsg aptget purge pkgb:none -y
c919ad6e
DK
68testdpkgnotinstalled pkgb
69
70# check that dependencies are created after the none package exists in the cache
71rm rootdir/var/cache/apt/*.bin
72insertinstalledpackage 'pkgb' 'none' '1'
73insertinstalledpackage 'pkgf' 'none' '1' 'Conflicts: pkgb'
74insertinstalledpackage 'pkgg' 'amd64' '1' 'Conflicts: pkgb'
75insertinstalledpackage 'pkgb' 'amd64' '2'
18908589 76testequalor2 "Reading package lists...
c919ad6e
DK
77Building dependency tree...
78Reading state information...
79You might want to run 'apt-get -f install' to correct these.
80The following packages have unmet dependencies:
81 pkgb : Conflicts: pkgb:none but 1 is installed
82 pkgb:none : Conflicts: pkgb but 2 is installed
83 pkgf:none : Conflicts: pkgb:none but 1 is installed
84 Conflicts: pkgb but 2 is installed
85 pkgg : Conflicts: pkgb but 2 is installed
86 Conflicts: pkgb:none but 1 is installed
18908589
DK
87E: Unmet dependencies. Try using -f." "Reading package lists...
88Building dependency tree...
89Reading state information...
90You might want to run 'apt-get -f install' to correct these.
91The following packages have unmet dependencies:
92 pkgb : Conflicts: pkgb:none but 1 is installed
93 pkgb:none : Conflicts: pkgb but 2 is installed
94 pkgf:none : Conflicts: pkgb but 2 is installed
95 Conflicts: pkgb:none but 1 is installed
96 pkgg : Conflicts: pkgb but 2 is installed
97 Conflicts: pkgb:none but 1 is installed
c919ad6e 98E: Unmet dependencies. Try using -f." aptget check
7605509f
DK
99
100# check that dependencies are generated for none-packages
101rm rootdir/var/lib/dpkg/status
102insertinstalledpackage 'pkgx' 'none' '1'
103insertinstalledpackage 'pkgy' 'none' '1' 'Depends: pkgz, pkgx (>= 1)'
104insertinstalledpackage 'pkgz' 'none' '1'
105testequal 'Reading package lists...
106Building dependency tree...
107Reading state information...
108The following packages will be REMOVED:
109 pkgx:none* pkgy:none*
1100 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
111Purg pkgy:none [1]
112Purg pkgx:none [1]' aptget purge pkgx -s
113testequal 'Reading package lists...
114Building dependency tree...
115Reading state information...
116The following packages will be REMOVED:
117 pkgy:none* pkgz:none*
1180 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
119Purg pkgy:none [1]
120Purg pkgz:none [1]' aptget purge pkgz -s