]> git.saurik.com Git - apt.git/blame_incremental - test/integration/test-bug-604222-new-and-autoremove
ensure filesize of deb is included in the hashes list
[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
14AUTOREMOVE='apt autoremove'
15if [ -n "$SUDO_USER" ]; then
16 AUTOREMOVE="sudo $AUTOREMOVE"
17fi
18
19testsuccessequal "Reading package lists...
20Building dependency tree...
21Reading state information...
22The following package was automatically installed and is no longer required:
23 libvtk5.4
24Use '$AUTOREMOVE' to remove it.
25The following NEW packages will be installed:
26 libavcodec52
270 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
28Inst libavcodec52 (4:0.5.2-6 localhost [i386])
29Conf libavcodec52 (4:0.5.2-6 localhost [i386])" aptget install libavcodec52 -s
30
31testsuccessequal "Reading package lists...
32Building dependency tree...
33Reading state information...
341 package was automatically installed and is no longer required.
35Use '$AUTOREMOVE' to remove it.
36The following NEW packages will be installed:
37 libavcodec52
380 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
39Inst libavcodec52 (4:0.5.2-6 localhost [i386])
40Conf libavcodec52 (4:0.5.2-6 localhost [i386])" aptget install libavcodec52 -s -o APT::Get::HideAutoRemove=small
41
42testfailureequal "Reading package lists...
43Building dependency tree...
44Reading state information...
45The following package was automatically installed and is no longer required:
46 libvtk5.4
47Use '$AUTOREMOVE' to remove it.
48The following additional packages will be installed:
49 libavcodec52 libopenal-dev libvtk5.4
50The following NEW packages will be installed:
51 dummy-archive libavcodec52 libopenal-dev
52The following packages will be upgraded:
53 libvtk5.4
541 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
55Need to get 0 B/19.4 MB of archives.
56After this operation, 17.3 MB of additional disk space will be used.
57E: Trivial Only specified but this is not a trivial operation." aptget install dummy-archive --trivial-only
58testequal "Reading package lists...
59Building dependency tree...
60Reading state information...
611 package was automatically installed and is no longer required.
62Use '$AUTOREMOVE' to remove it.
63The following additional packages will be installed:
64 libavcodec52 libopenal-dev libvtk5.4
65The following NEW packages will be installed:
66 dummy-archive libavcodec52 libopenal-dev
67The following packages will be upgraded:
68 libvtk5.4
691 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
70Need to get 0 B/19.4 MB of archives.
71After this operation, 17.3 MB of additional disk space will be used.
72E: Trivial Only specified but this is not a trivial operation." aptget install dummy-archive --trivial-only -o APT::Get::HideAutoRemove=small
73
74echo -n > rootdir/var/lib/dpkg/status
75rm rootdir/var/lib/apt/extended_states
76
77CONFLICTING='Reading package lists...
78Building 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
86The following additional packages will be installed:
87 libavcodec52 libopenal-dev
88The following NEW packages will be installed:
89 dummy-archive libavcodec52 libopenal-dev
900 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
91Need to get 0 B/6304 kB of archives.
92After this operation, 17.3 MB of additional disk space will be used.
93E: Trivial Only specified but this is not a trivial operation.'
94
95testfailureequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=0
96testfailureequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=1
97testfailureequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=small