]> git.saurik.com Git - apt.git/blob - test/integration/test-prevent-markinstall-multiarch-same-versionscrew
ignore std::locale exeception on non-existent "" locale
[apt.git] / test / integration / test-prevent-markinstall-multiarch-same-versionscrew
1 #!/bin/sh
2 set -e
3
4 TESTDIR="$(readlink -f "$(dirname "$0")")"
5 . "$TESTDIR/framework"
6 setupenvironment
7 configarchitecture 'amd64' 'i386' 'armel'
8
9 insertpackage 'stable' 'allarchs' 'all' '1'
10 insertpackage 'unstable' 'allarchs' 'all' '2'
11
12 insertpackage 'stable,installed' 'fine' 'i386,amd64' '1' 'Multi-Arch: same'
13 insertpackage 'unstable' 'fine' 'amd64,i386' '2' 'Multi-Arch: same'
14 insertpackage 'experimental' 'fine' 'amd64,i386' '3' 'Multi-Arch: same'
15
16 insertinstalledpackage 'fine-installed' 'i386,amd64' '1' 'Multi-Arch: same'
17 insertpackage 'stable' 'fine-installed' 'i386,amd64,armel' '1' 'Multi-Arch: same'
18 insertpackage 'unstable' 'fine-installed' 'i386,amd64' '2' 'Multi-Arch: same'
19 insertpackage 'experimental' 'fine-installed' 'i386,amd64' '3' 'Multi-Arch: same'
20
21 insertpackage 'stable,installed' 'out-of-sync-native' 'i386,amd64' '1' 'Multi-Arch: same'
22 insertpackage 'unstable' 'out-of-sync-native' 'amd64' '2' 'Multi-Arch: same'
23
24 insertpackage 'stable,installed' 'out-of-sync-foreign' 'i386,amd64' '1' 'Multi-Arch: same'
25 insertpackage 'unstable' 'out-of-sync-foreign' 'i386' '2' 'Multi-Arch: same'
26
27 insertinstalledpackage 'out-of-sync-gone-native' 'i386,amd64' '1' 'Multi-Arch: same'
28 insertpackage 'stable' 'out-of-sync-gone-native' 'i386' '1' 'Multi-Arch: same'
29 insertpackage 'unstable' 'out-of-sync-gone-native' 'i386' '2' 'Multi-Arch: same'
30
31 insertinstalledpackage 'out-of-sync-gone-foreign' 'i386,amd64' '1' 'Multi-Arch: same'
32 insertpackage 'stable' 'out-of-sync-gone-foreign' 'amd64' '1' 'Multi-Arch: same'
33 insertpackage 'unstable' 'out-of-sync-gone-foreign' 'amd64' '2' 'Multi-Arch: same'
34
35 insertpackage 'stable' 'libsame2' 'i386' '1' 'Multi-Arch: same'
36 insertpackage 'unstable' 'libsame2' 'amd64' '2' 'Multi-Arch: same'
37 insertpackage 'unstable' 'depender2' 'all' '2' 'Depends: libsame2 (= 2)'
38 insertpackage 'stable' 'libsame3' 'i386' '1' 'Multi-Arch: same'
39 insertpackage 'unstable' 'libsame3' 'i386,amd64' '3' 'Multi-Arch: same'
40 insertpackage 'unstable' 'depender3' 'all' '3' 'Depends: libsame3 (= 3)'
41 setupaptarchive
42
43 testsuccessequal 'Reading package lists...
44 Building dependency tree...
45 Calculating upgrade...
46 The following packages will be REMOVED:
47 out-of-sync-gone-foreign:i386 out-of-sync-gone-native
48 The following packages have been kept back:
49 out-of-sync-foreign:i386 out-of-sync-native
50 The following packages will be upgraded:
51 fine fine:i386 fine-installed fine-installed:i386 out-of-sync-gone-foreign
52 out-of-sync-gone-native:i386
53 6 upgraded, 0 newly installed, 2 to remove and 2 not upgraded.
54 Remv out-of-sync-gone-foreign:i386 [1]
55 Remv out-of-sync-gone-native [1]
56 Inst fine [1] (2 unstable [amd64]) [fine:amd64 on fine:i386] [fine:i386 on fine:amd64] [fine:i386 ]
57 Inst fine:i386 [1] (2 unstable [i386])
58 Inst fine-installed [1] (2 unstable [amd64]) [fine-installed:amd64 on fine-installed:i386] [fine-installed:i386 on fine-installed:amd64] [fine-installed:i386 ]
59 Inst fine-installed:i386 [1] (2 unstable [i386])
60 Inst out-of-sync-gone-foreign [1] (2 unstable [amd64])
61 Inst out-of-sync-gone-native:i386 [1] (2 unstable [i386])
62 Conf fine:i386 (2 unstable [i386])
63 Conf fine (2 unstable [amd64])
64 Conf fine-installed:i386 (2 unstable [i386])
65 Conf fine-installed (2 unstable [amd64])
66 Conf out-of-sync-gone-foreign (2 unstable [amd64])
67 Conf out-of-sync-gone-native:i386 (2 unstable [i386])' aptget dist-upgrade -s #-o Debug::pkgDepCache::Marker=1
68
69 echo 'Package: fine:* fine-installed:*
70 Pin: release a=experimental
71 Pin-Priority: 500' > rootdir/etc/apt/preferences.d/experimental.pref
72
73 testsuccessequal 'Reading package lists...
74 Building dependency tree...
75 Calculating upgrade...
76 The following packages will be REMOVED:
77 out-of-sync-gone-foreign:i386 out-of-sync-gone-native
78 The following packages have been kept back:
79 out-of-sync-foreign:i386 out-of-sync-native
80 The following packages will be upgraded:
81 fine fine:i386 fine-installed fine-installed:i386 out-of-sync-gone-foreign
82 out-of-sync-gone-native:i386
83 6 upgraded, 0 newly installed, 2 to remove and 2 not upgraded.
84 Remv out-of-sync-gone-foreign:i386 [1]
85 Remv out-of-sync-gone-native [1]
86 Inst fine [1] (3 experimental [amd64]) [fine:amd64 on fine:i386] [fine:i386 on fine:amd64] [fine:i386 ]
87 Inst fine:i386 [1] (3 experimental [i386])
88 Inst fine-installed [1] (3 experimental [amd64]) [fine-installed:amd64 on fine-installed:i386] [fine-installed:i386 on fine-installed:amd64] [fine-installed:i386 ]
89 Inst fine-installed:i386 [1] (3 experimental [i386])
90 Inst out-of-sync-gone-foreign [1] (2 unstable [amd64])
91 Inst out-of-sync-gone-native:i386 [1] (2 unstable [i386])
92 Conf fine:i386 (3 experimental [i386])
93 Conf fine (3 experimental [amd64])
94 Conf fine-installed:i386 (3 experimental [i386])
95 Conf fine-installed (3 experimental [amd64])
96 Conf out-of-sync-gone-foreign (2 unstable [amd64])
97 Conf out-of-sync-gone-native:i386 (2 unstable [i386])' aptget dist-upgrade -s #-o Debug::pkgDepCache::Marker=1
98
99 rm rootdir/var/lib/dpkg/status
100 insertinstalledpackage 'libsame2' 'i386' '1' 'Multi-Arch: same'
101 insertinstalledpackage 'libsame3' 'i386' '1' 'Multi-Arch: same'
102
103 # the error message isn't great, but better than nothing, right?
104 testfailureequal 'Reading package lists...
105 Building dependency tree...
106 Some packages could not be installed. This may mean that you have
107 requested an impossible situation or if you are using the unstable
108 distribution that some required packages have not yet been created
109 or been moved out of Incoming.
110 The following information may help to resolve the situation:
111
112 The following packages have unmet dependencies:
113 depender2 : Depends: libsame2 (= 2) but it is not going to be installed
114 E: Unable to correct problems, you have held broken packages.' aptget install depender2 -s
115
116 testsuccessequal 'Reading package lists...
117 Building dependency tree...
118 The following additional packages will be installed:
119 libsame3:i386 libsame3
120 The following NEW packages will be installed:
121 depender3 libsame3
122 The following packages will be upgraded:
123 libsame3:i386
124 1 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
125 Inst libsame3:i386 [1] (3 unstable [i386])
126 Inst libsame3 (3 unstable [amd64])
127 Inst depender3 (3 unstable [all])
128 Conf libsame3:i386 (3 unstable [i386])
129 Conf libsame3 (3 unstable [amd64])
130 Conf depender3 (3 unstable [all])' aptget install depender3 -s