]> git.saurik.com Git - apt.git/blob - test/integration/test-bug-675449-essential-are-protected
support "install ./foo.changes"
[apt.git] / test / integration / test-bug-675449-essential-are-protected
1 #!/bin/sh
2 set -e
3
4 TESTDIR="$(readlink -f "$(dirname "$0")")"
5 . "$TESTDIR/framework"
6 setupenvironment
7 configarchitecture 'amd64' 'i386'
8
9 insertinstalledpackage 'pkg-native' 'amd64' '1' 'Multi-Arch: foreign
10 Essential: yes'
11 insertinstalledpackage 'pkg-foreign' 'i386' '1' 'Multi-Arch: foreign
12 Essential: yes'
13 insertinstalledpackage 'pkg-none-native' 'amd64' '1' 'Essential: yes'
14 insertinstalledpackage 'pkg-none-foreign' 'i386' '1' 'Essential: yes'
15
16 insertpackage 'unstable' 'pkg-native' 'amd64,i386' '2' 'Multi-Arch: foreign
17 Essential: yes'
18 insertpackage 'unstable' 'pkg-foreign' 'amd64,i386' '2' 'Multi-Arch: foreign
19 Depends: pkg-depends-new
20 Essential: yes'
21 insertpackage 'unstable' 'pkg-none-native' 'amd64,i386' '2' 'Essential: yes'
22 insertpackage 'unstable' 'pkg-none-foreign' 'amd64,i386' '2' 'Essential: yes
23 Depends: pkg-depends-new'
24
25 insertpackage 'unstable' 'pkg-none-new' 'amd64,i386' '2' 'Essential: yes'
26 insertpackage 'unstable' 'pkg-depends-new' 'amd64,i386' '2' 'Essential: yes'
27
28 setupaptarchive
29
30 testsuccessequal 'Reading package lists...
31 Building dependency tree...
32 The following packages will be REMOVED:
33 pkg-native*
34 WARNING: The following essential packages will be removed.
35 This should NOT be done unless you know exactly what you are doing!
36 pkg-native
37 0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
38 Purg pkg-native [1]' aptget purge pkg-native -s
39
40 testsuccessequal 'Reading package lists...
41 Building dependency tree...
42 The following packages will be REMOVED:
43 pkg-foreign:i386*
44 WARNING: The following essential packages will be removed.
45 This should NOT be done unless you know exactly what you are doing!
46 pkg-foreign:i386
47 0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
48 Purg pkg-foreign:i386 [1]' aptget purge pkg-foreign:i386 -s
49
50 testsuccessequal 'Reading package lists...
51 Building dependency tree...
52 The following packages will be REMOVED:
53 pkg-none-native*
54 WARNING: The following essential packages will be removed.
55 This should NOT be done unless you know exactly what you are doing!
56 pkg-none-native
57 0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
58 Purg pkg-none-native [1]' aptget purge pkg-none-native -s
59
60 testsuccessequal 'Reading package lists...
61 Building dependency tree...
62 The following packages will be REMOVED:
63 pkg-none-foreign:i386*
64 WARNING: The following essential packages will be removed.
65 This should NOT be done unless you know exactly what you are doing!
66 pkg-none-foreign:i386
67 0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
68 Purg pkg-none-foreign:i386 [1]' aptget purge pkg-none-foreign:i386 -s
69
70 testsuccessequal 'Reading package lists...
71 Building dependency tree...
72 Calculating upgrade...
73 The following NEW packages will be installed:
74 pkg-depends-new:i386 pkg-none-new
75 The following packages will be upgraded:
76 pkg-foreign:i386 pkg-native pkg-none-foreign:i386 pkg-none-native
77 4 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
78 Inst pkg-depends-new:i386 (2 unstable [i386])
79 Conf pkg-depends-new:i386 (2 unstable [i386])
80 Inst pkg-foreign:i386 [1] (2 unstable [i386])
81 Conf pkg-foreign:i386 (2 unstable [i386])
82 Inst pkg-native [1] (2 unstable [amd64])
83 Conf pkg-native (2 unstable [amd64])
84 Inst pkg-none-foreign:i386 [1] (2 unstable [i386])
85 Conf pkg-none-foreign:i386 (2 unstable [i386])
86 Inst pkg-none-native [1] (2 unstable [amd64])
87 Conf pkg-none-native (2 unstable [amd64])
88 Inst pkg-none-new (2 unstable [amd64])
89 Conf pkg-none-new (2 unstable [amd64])' aptget dist-upgrade -s
90
91 insertinstalledpackage 'foo' 'amd64' '1' 'Depends: libfoo
92 Essential: yes'
93 insertinstalledpackage 'libfoo' 'amd64' '1'
94 testequal 'Reading package lists...
95 Building dependency tree...
96 The following packages will be REMOVED:
97 foo* libfoo*
98 WARNING: The following essential packages will be removed.
99 This should NOT be done unless you know exactly what you are doing!
100 foo libfoo (due to foo)
101 0 upgraded, 0 newly installed, 2 to remove and 4 not upgraded.
102 Purg foo [1]
103 Purg libfoo [1]' aptget purge libfoo -s