]> git.saurik.com Git - apt.git/blame - test/integration/test-bug-604222-new-and-autoremove
link DependencyData structs together
[apt.git] / test / integration / test-bug-604222-new-and-autoremove
CommitLineData
a8dfff90
DK
1#!/bin/sh
2set -e
3
adee3bae 4TESTDIR=$(readlink -f $(dirname $0))
a8dfff90
DK
5. $TESTDIR/framework
6setupenvironment
7configarchitecture "i386"
8setupaptarchive
9
ec7f904e 10touch rootdir/var/lib/apt/extended_states
0440d936 11testsuccess aptmark markauto 'libvtk5.4'
ec7f904e 12testmarkedauto 'libvtk5.4'
a8dfff90 13
25b86db1 14testsuccessequal "Reading package lists...
a8dfff90
DK
15Building dependency tree...
16Reading state information...
17The following package was automatically installed and is no longer required:
18 libvtk5.4
de378651 19Use 'apt-get autoremove' to remove it.
a8dfff90
DK
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
a0c19a21
DK
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
25b86db1 37testfailureequal "Reading package lists...
a8dfff90
DK
38Building dependency tree...
39Reading state information...
40The following package was automatically installed and is no longer required:
41 libvtk5.4
de378651 42Use 'apt-get autoremove' to remove it.
a8dfff90
DK
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
a0c19a21
DK
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
a8dfff90
DK
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
b29c4482 80 MarkDelete libvtk5.4 [ i386 ] < none -> 5.4.2-8 > ( libs ) FU=0
a8dfff90
DK
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
25b86db1
DK
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