]> git.saurik.com Git - apt.git/blob - test/integration/test-bug-604222-new-and-autoremove
support multiple fingerprints in signed-by
[apt.git] / test / integration / test-bug-604222-new-and-autoremove
1 #!/bin/sh
2 set -e
3
4 TESTDIR="$(readlink -f "$(dirname "$0")")"
5 . "$TESTDIR/framework"
6 setupenvironment
7 configarchitecture "i386"
8 setupaptarchive
9
10 touch rootdir/var/lib/apt/extended_states
11 testsuccess aptmark markauto 'libvtk5.4'
12 testmarkedauto 'libvtk5.4'
13
14 AUTOREMOVE='apt autoremove'
15 if [ -n "$SUDO_USER" ]; then
16 AUTOREMOVE="sudo $AUTOREMOVE"
17 fi
18
19 testsuccessequal "Reading package lists...
20 Building dependency tree...
21 Reading state information...
22 The following package was automatically installed and is no longer required:
23 libvtk5.4
24 Use '$AUTOREMOVE' to remove it.
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
31 testsuccessequal "Reading package lists...
32 Building dependency tree...
33 Reading state information...
34 1 package was automatically installed and is no longer required.
35 Use '$AUTOREMOVE' to remove it.
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
42 testfailureequal "Reading package lists...
43 Building dependency tree...
44 Reading state information...
45 The following package was automatically installed and is no longer required:
46 libvtk5.4
47 Use '$AUTOREMOVE' to remove it.
48 The following additional packages will be installed:
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
58 testequal "Reading package lists...
59 Building dependency tree...
60 Reading state information...
61 1 package was automatically installed and is no longer required.
62 Use '$AUTOREMOVE' to remove it.
63 The following additional packages will be installed:
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
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...
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
86 The following additional packages will be installed:
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
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