]> git.saurik.com Git - apt.git/blame_incremental - test/integration/test-bug-604222-new-and-autoremove
link DependencyData structs together
[apt.git] / test / integration / test-bug-604222-new-and-autoremove
... / ...
CommitLineData
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6setupenvironment
7configarchitecture "i386"
8setupaptarchive
9
10touch rootdir/var/lib/apt/extended_states
11testsuccess aptmark markauto 'libvtk5.4'
12testmarkedauto 'libvtk5.4'
13
14testsuccessequal "Reading package lists...
15Building dependency tree...
16Reading state information...
17The following package was automatically installed and is no longer required:
18 libvtk5.4
19Use 'apt-get autoremove' to remove it.
20The following NEW packages will be installed:
21 libavcodec52
220 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
23Inst libavcodec52 (4:0.5.2-6 localhost [i386])
24Conf libavcodec52 (4:0.5.2-6 localhost [i386])" aptget install libavcodec52 -s
25
26testsuccessequal "Reading package lists...
27Building dependency tree...
28Reading state information...
291 package was automatically installed and is no longer required.
30Use 'apt-get autoremove' to remove it.
31The following NEW packages will be installed:
32 libavcodec52
330 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
34Inst libavcodec52 (4:0.5.2-6 localhost [i386])
35Conf libavcodec52 (4:0.5.2-6 localhost [i386])" aptget install libavcodec52 -s -o APT::Get::HideAutoRemove=small
36
37testfailureequal "Reading package lists...
38Building dependency tree...
39Reading state information...
40The following package was automatically installed and is no longer required:
41 libvtk5.4
42Use 'apt-get autoremove' to remove it.
43The following extra packages will be installed:
44 libavcodec52 libopenal-dev libvtk5.4
45The following NEW packages will be installed:
46 dummy-archive libavcodec52 libopenal-dev
47The following packages will be upgraded:
48 libvtk5.4
491 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
50Need to get 0 B/19.4 MB of archives.
51After this operation, 17.3 MB of additional disk space will be used.
52E: Trivial Only specified but this is not a trivial operation." aptget install dummy-archive --trivial-only
53testequal "Reading package lists...
54Building dependency tree...
55Reading state information...
561 package was automatically installed and is no longer required.
57Use 'apt-get autoremove' to remove it.
58The following extra packages will be installed:
59 libavcodec52 libopenal-dev libvtk5.4
60The following NEW packages will be installed:
61 dummy-archive libavcodec52 libopenal-dev
62The following packages will be upgraded:
63 libvtk5.4
641 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
65Need to get 0 B/19.4 MB of archives.
66After this operation, 17.3 MB of additional disk space will be used.
67E: Trivial Only specified but this is not a trivial operation." aptget install dummy-archive --trivial-only -o APT::Get::HideAutoRemove=small
68
69echo -n > rootdir/var/lib/dpkg/status
70rm rootdir/var/lib/apt/extended_states
71
72CONFLICTING='Reading package lists...
73Building dependency tree...
74 MarkInstall dummy-archive [ i386 ] < none -> 0.invalid.0 > ( admin ) FU=1
75 MarkInstall libavcodec52 [ i386 ] < none -> 4:0.5.2-6 > ( libs ) FU=0
76 MarkInstall libvtk5-dev [ i386 ] < none -> 5.4.2-8 > ( libdevel ) FU=0
77 MarkInstall libvtk5.4 [ i386 ] < none -> 5.4.2-8 > ( libs ) FU=0
78 MarkKeep libvtk5-dev [ i386 ] < none -> 5.4.2-8 > ( libdevel ) FU=0
79 MarkKeep libvtk5-dev [ i386 ] < none -> 5.4.2-8 > ( libdevel ) FU=0
80 MarkDelete libvtk5.4 [ i386 ] < none -> 5.4.2-8 > ( libs ) FU=0
81The following extra packages will be installed:
82 libavcodec52 libopenal-dev
83The following NEW packages will be installed:
84 dummy-archive libavcodec52 libopenal-dev
850 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
86Need to get 0 B/6304 kB of archives.
87After this operation, 17.3 MB of additional disk space will be used.
88E: Trivial Only specified but this is not a trivial operation.'
89
90testfailureequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=0
91testfailureequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=1
92testfailureequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=small