]>
Commit | Line | Data |
---|---|---|
a8dfff90 DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
3abb6a6a DK |
4 | TESTDIR="$(readlink -f "$(dirname "$0")")" |
5 | . "$TESTDIR/framework" | |
a8dfff90 DK |
6 | setupenvironment |
7 | configarchitecture "i386" | |
95217178 DK |
8 | |
9 | insertpackage 'stable' 'dummy-archive' 'i386' '0.invalid.0' 'Depends: libavcodec52, libvtk5-dev | libopenal-dev' | |
10 | insertpackage 'stable' 'libavcodec52' 'i386' '4:0.5.2-6' 'Conflicts: libvtk5-dev' | |
11 | insertpackage 'stable' 'libopenal-dev' 'i386' '1:1.12.854-2' | |
12 | insertpackage 'stable' 'libvtk5-dev' 'i386' '5.4.2-8' 'Depends: libvtk5.4 (= 5.4.2-8)' | |
13 | insertpackage 'stable' 'libvtk5.4' 'i386' '5.4.2-8' 'Depends: libavcodec52 (>= 4:0.5.1-1)' | |
14 | ||
15 | insertpackage 'stable' 'gwenview' 'i386' '4:16.08.0-1' 'Depends: libkf5kipi-bin, libkf5kipi-data' | |
16 | insertpackage 'stable' 'libkf5kipi-bin' 'i386' '4:16.08.0-1' | |
17 | insertpackage 'stable' 'libkf5kipi-data' 'i386' '4:16.08.0-1' 'Breaks: libkipi-data' | |
18 | insertpackage 'stable' 'libkipi-data' 'i386' '4:15.08.0-1' '' 'important' | |
19 | ||
a8dfff90 DK |
20 | setupaptarchive |
21 | ||
95217178 DK |
22 | cp -a rootdir/var/lib/dpkg/status rootdir/var/lib/dpkg/status.backup |
23 | insertinstalledpackage 'libvtk5.4' 'i386' '5.4.2-7' | |
0440d936 | 24 | testsuccess aptmark markauto 'libvtk5.4' |
ec7f904e | 25 | testmarkedauto 'libvtk5.4' |
a8dfff90 | 26 | |
73fe49f9 DK |
27 | AUTOREMOVE='apt autoremove' |
28 | if [ -n "$SUDO_USER" ]; then | |
29 | AUTOREMOVE="sudo $AUTOREMOVE" | |
30 | fi | |
31 | ||
25b86db1 | 32 | testsuccessequal "Reading package lists... |
a8dfff90 DK |
33 | Building dependency tree... |
34 | Reading state information... | |
35 | The following package was automatically installed and is no longer required: | |
36 | libvtk5.4 | |
73fe49f9 | 37 | Use '$AUTOREMOVE' to remove it. |
a8dfff90 DK |
38 | The following NEW packages will be installed: |
39 | libavcodec52 | |
40 | 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. | |
95217178 DK |
41 | Inst libavcodec52 (4:0.5.2-6 stable [i386]) |
42 | Conf libavcodec52 (4:0.5.2-6 stable [i386])" aptget install libavcodec52 -s | |
a8dfff90 | 43 | |
a0c19a21 DK |
44 | testsuccessequal "Reading package lists... |
45 | Building dependency tree... | |
46 | Reading state information... | |
47 | 1 package was automatically installed and is no longer required. | |
73fe49f9 | 48 | Use '$AUTOREMOVE' to remove it. |
a0c19a21 DK |
49 | The following NEW packages will be installed: |
50 | libavcodec52 | |
51 | 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. | |
95217178 DK |
52 | Inst libavcodec52 (4:0.5.2-6 stable [i386]) |
53 | Conf libavcodec52 (4:0.5.2-6 stable [i386])" aptget install libavcodec52 -s -o APT::Get::HideAutoRemove=small | |
a0c19a21 | 54 | |
25b86db1 | 55 | testfailureequal "Reading package lists... |
a8dfff90 DK |
56 | Building dependency tree... |
57 | Reading state information... | |
58 | The following package was automatically installed and is no longer required: | |
59 | libvtk5.4 | |
73fe49f9 | 60 | Use '$AUTOREMOVE' to remove it. |
e7ebb414 | 61 | The following additional packages will be installed: |
a8dfff90 DK |
62 | libavcodec52 libopenal-dev libvtk5.4 |
63 | The following NEW packages will be installed: | |
64 | dummy-archive libavcodec52 libopenal-dev | |
65 | The following packages will be upgraded: | |
66 | libvtk5.4 | |
67 | 1 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. | |
95217178 | 68 | After this operation, 129 kB of additional disk space will be used. |
a8dfff90 | 69 | E: Trivial Only specified but this is not a trivial operation." aptget install dummy-archive --trivial-only |
a0c19a21 DK |
70 | testequal "Reading package lists... |
71 | Building dependency tree... | |
72 | Reading state information... | |
73 | 1 package was automatically installed and is no longer required. | |
73fe49f9 | 74 | Use '$AUTOREMOVE' to remove it. |
e7ebb414 | 75 | The following additional packages will be installed: |
a0c19a21 DK |
76 | libavcodec52 libopenal-dev libvtk5.4 |
77 | The following NEW packages will be installed: | |
78 | dummy-archive libavcodec52 libopenal-dev | |
79 | The following packages will be upgraded: | |
80 | libvtk5.4 | |
81 | 1 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. | |
95217178 | 82 | After this operation, 129 kB of additional disk space will be used. |
a0c19a21 | 83 | E: Trivial Only specified but this is not a trivial operation." aptget install dummy-archive --trivial-only -o APT::Get::HideAutoRemove=small |
a8dfff90 | 84 | |
95217178 DK |
85 | cp rootdir/var/lib/dpkg/status.backup rootdir/var/lib/dpkg/status |
86 | rm -f rootdir/var/lib/apt/extended_states | |
a8dfff90 DK |
87 | |
88 | CONFLICTING='Reading package lists... | |
89 | Building dependency tree... | |
d622baee DK |
90 | MarkInstall dummy-archive:i386 < none -> 0.invalid.0 @un puN Ib > FU=1 |
91 | MarkInstall libavcodec52:i386 < none -> 4:0.5.2-6 @un uN > FU=0 | |
92 | MarkInstall libvtk5-dev:i386 < none -> 5.4.2-8 @un uN Ib > FU=0 | |
93 | MarkInstall libvtk5.4:i386 < none -> 5.4.2-8 @un uN > FU=0 | |
94 | MarkKeep libvtk5-dev:i386 < none -> 5.4.2-8 @un uN > FU=0 | |
95 | MarkKeep libvtk5-dev:i386 < none -> 5.4.2-8 @un uN > FU=0 | |
96 | MarkDelete libvtk5.4:i386 < none -> 5.4.2-8 @un ugN > FU=0 | |
e7ebb414 | 97 | The following additional packages will be installed: |
a8dfff90 DK |
98 | libavcodec52 libopenal-dev |
99 | The following NEW packages will be installed: | |
100 | dummy-archive libavcodec52 libopenal-dev | |
101 | 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. | |
95217178 | 102 | After this operation, 129 kB of additional disk space will be used. |
a8dfff90 DK |
103 | E: Trivial Only specified but this is not a trivial operation.' |
104 | ||
25b86db1 DK |
105 | testfailureequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=0 |
106 | testfailureequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=1 | |
107 | testfailureequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=small | |
95217178 DK |
108 | |
109 | insertinstalledpackage 'my-metapackage' 'i386' '1' 'Depends: gwenview' | |
110 | insertinstalledpackage 'gwenview' 'i386' '4:15.08.0-1' 'Depends: libkipi-data | |
111 | Recommends: foobar' # trigger policy brokenness to avoid optimisation | |
112 | insertinstalledpackage 'libkipi-data' 'i386' '4:15.08.0-1' '' 'important' | |
113 | testsuccess aptmark markauto 'gwenview' | |
114 | ||
115 | testsuccessequal "Reading package lists... | |
116 | Building dependency tree... | |
117 | Reading state information... | |
118 | Calculating upgrade... | |
119 | The following packages have been kept back: | |
120 | gwenview | |
121 | 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded." apt dist-upgrade -s |