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