]>
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" | |
8 | setupaptarchive | |
9 | ||
ec7f904e | 10 | touch rootdir/var/lib/apt/extended_states |
0440d936 | 11 | testsuccess aptmark markauto 'libvtk5.4' |
ec7f904e | 12 | testmarkedauto 'libvtk5.4' |
a8dfff90 | 13 | |
73fe49f9 DK |
14 | AUTOREMOVE='apt autoremove' |
15 | if [ -n "$SUDO_USER" ]; then | |
16 | AUTOREMOVE="sudo $AUTOREMOVE" | |
17 | fi | |
18 | ||
25b86db1 | 19 | testsuccessequal "Reading package lists... |
a8dfff90 DK |
20 | Building dependency tree... |
21 | Reading state information... | |
22 | The following package was automatically installed and is no longer required: | |
23 | libvtk5.4 | |
73fe49f9 | 24 | Use '$AUTOREMOVE' to remove it. |
a8dfff90 DK |
25 | The following NEW packages will be installed: |
26 | libavcodec52 | |
27 | 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. | |
28 | Inst libavcodec52 (4:0.5.2-6 localhost [i386]) | |
29 | Conf libavcodec52 (4:0.5.2-6 localhost [i386])" aptget install libavcodec52 -s | |
30 | ||
a0c19a21 DK |
31 | testsuccessequal "Reading package lists... |
32 | Building dependency tree... | |
33 | Reading state information... | |
34 | 1 package was automatically installed and is no longer required. | |
73fe49f9 | 35 | Use '$AUTOREMOVE' to remove it. |
a0c19a21 DK |
36 | The following NEW packages will be installed: |
37 | libavcodec52 | |
38 | 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. | |
39 | Inst libavcodec52 (4:0.5.2-6 localhost [i386]) | |
40 | Conf libavcodec52 (4:0.5.2-6 localhost [i386])" aptget install libavcodec52 -s -o APT::Get::HideAutoRemove=small | |
41 | ||
25b86db1 | 42 | testfailureequal "Reading package lists... |
a8dfff90 DK |
43 | Building dependency tree... |
44 | Reading state information... | |
45 | The following package was automatically installed and is no longer required: | |
46 | libvtk5.4 | |
73fe49f9 | 47 | Use '$AUTOREMOVE' to remove it. |
e7ebb414 | 48 | The following additional packages will be installed: |
a8dfff90 DK |
49 | libavcodec52 libopenal-dev libvtk5.4 |
50 | The following NEW packages will be installed: | |
51 | dummy-archive libavcodec52 libopenal-dev | |
52 | The following packages will be upgraded: | |
53 | libvtk5.4 | |
54 | 1 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. | |
55 | Need to get 0 B/19.4 MB of archives. | |
56 | After this operation, 17.3 MB of additional disk space will be used. | |
57 | E: Trivial Only specified but this is not a trivial operation." aptget install dummy-archive --trivial-only | |
a0c19a21 DK |
58 | testequal "Reading package lists... |
59 | Building dependency tree... | |
60 | Reading state information... | |
61 | 1 package was automatically installed and is no longer required. | |
73fe49f9 | 62 | Use '$AUTOREMOVE' to remove it. |
e7ebb414 | 63 | The following additional packages will be installed: |
a0c19a21 DK |
64 | libavcodec52 libopenal-dev libvtk5.4 |
65 | The following NEW packages will be installed: | |
66 | dummy-archive libavcodec52 libopenal-dev | |
67 | The following packages will be upgraded: | |
68 | libvtk5.4 | |
69 | 1 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. | |
70 | Need to get 0 B/19.4 MB of archives. | |
71 | After this operation, 17.3 MB of additional disk space will be used. | |
72 | E: Trivial Only specified but this is not a trivial operation." aptget install dummy-archive --trivial-only -o APT::Get::HideAutoRemove=small | |
a8dfff90 DK |
73 | |
74 | echo -n > rootdir/var/lib/dpkg/status | |
75 | rm rootdir/var/lib/apt/extended_states | |
76 | ||
77 | CONFLICTING='Reading package lists... | |
78 | Building dependency tree... | |
d622baee DK |
79 | MarkInstall dummy-archive:i386 < none -> 0.invalid.0 @un puN Ib > FU=1 |
80 | MarkInstall libavcodec52:i386 < none -> 4:0.5.2-6 @un uN > FU=0 | |
81 | MarkInstall libvtk5-dev:i386 < none -> 5.4.2-8 @un uN Ib > FU=0 | |
82 | MarkInstall libvtk5.4:i386 < none -> 5.4.2-8 @un uN > FU=0 | |
83 | MarkKeep libvtk5-dev:i386 < none -> 5.4.2-8 @un uN > FU=0 | |
84 | MarkKeep libvtk5-dev:i386 < none -> 5.4.2-8 @un uN > FU=0 | |
85 | MarkDelete libvtk5.4:i386 < none -> 5.4.2-8 @un ugN > FU=0 | |
e7ebb414 | 86 | The following additional packages will be installed: |
a8dfff90 DK |
87 | libavcodec52 libopenal-dev |
88 | The following NEW packages will be installed: | |
89 | dummy-archive libavcodec52 libopenal-dev | |
90 | 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. | |
91 | Need to get 0 B/6304 kB of archives. | |
92 | After this operation, 17.3 MB of additional disk space will be used. | |
93 | E: Trivial Only specified but this is not a trivial operation.' | |
94 | ||
25b86db1 DK |
95 | testfailureequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=0 |
96 | testfailureequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=1 | |
97 | testfailureequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=small |