]> git.saurik.com Git - apt.git/blob - test/integration/test-bug-604222-new-and-autoremove
improve tests
[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 testequal "Reading package lists...
15 Building dependency tree...
16 Reading state information...
17 The following package was automatically installed and is no longer required:
18 libvtk5.4
19 Use 'apt-get autoremove' to remove it.
20 The following NEW packages will be installed:
21 libavcodec52
22 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
23 Inst libavcodec52 (4:0.5.2-6 localhost [i386])
24 Conf libavcodec52 (4:0.5.2-6 localhost [i386])" aptget install libavcodec52 -s
25
26 testequal "Reading package lists...
27 Building dependency tree...
28 Reading state information...
29 The following package was automatically installed and is no longer required:
30 libvtk5.4
31 Use 'apt-get autoremove' to remove it.
32 The following extra packages will be installed:
33 libavcodec52 libopenal-dev libvtk5.4
34 The following NEW packages will be installed:
35 dummy-archive libavcodec52 libopenal-dev
36 The following packages will be upgraded:
37 libvtk5.4
38 1 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
39 Need to get 0 B/19.4 MB of archives.
40 After this operation, 17.3 MB of additional disk space will be used.
41 E: Trivial Only specified but this is not a trivial operation." aptget install dummy-archive --trivial-only
42
43 echo -n > rootdir/var/lib/dpkg/status
44 rm rootdir/var/lib/apt/extended_states
45
46 CONFLICTING='Reading package lists...
47 Building dependency tree...
48 MarkInstall dummy-archive [ i386 ] < none -> 0.invalid.0 > ( admin ) FU=1
49 MarkInstall libavcodec52 [ i386 ] < none -> 4:0.5.2-6 > ( libs ) FU=0
50 MarkInstall libvtk5-dev [ i386 ] < none -> 5.4.2-8 > ( libdevel ) FU=0
51 MarkInstall libvtk5.4 [ i386 ] < none -> 5.4.2-8 > ( libs ) FU=0
52 MarkKeep libvtk5-dev [ i386 ] < none -> 5.4.2-8 > ( libdevel ) FU=0
53 MarkKeep libvtk5-dev [ i386 ] < none -> 5.4.2-8 > ( libdevel ) FU=0
54 MarkDelete libvtk5.4 [ i386 ] < none -> 5.4.2-8 > ( libs ) FU=0
55 The following extra packages will be installed:
56 libavcodec52 libopenal-dev
57 The following NEW packages will be installed:
58 dummy-archive libavcodec52 libopenal-dev
59 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
60 Need to get 0 B/6304 kB of archives.
61 After this operation, 17.3 MB of additional disk space will be used.
62 E: Trivial Only specified but this is not a trivial operation.'
63
64 testequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=0
65 testequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=1
66 testequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=small