]> git.saurik.com Git - apt.git/blame_incremental - test/integration/test-bug-611729-mark-as-manual
* apt-pkg/packagemanager.cc, apt-pkg/pkgcache.cc:
[apt.git] / test / integration / test-bug-611729-mark-as-manual
... / ...
CommitLineData
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6setupenvironment
7configarchitecture "i386"
8
9buildsimplenativepackage "peace-dpkg" "all" "1.0" "stable"
10
11buildsimplenativepackage "a" "all" "1.0" "stable" "Depends: b"
12buildsimplenativepackage "b" "all" "1.0" "stable"
13buildsimplenativepackage "c" "all" "1.0" "stable" "Depends: b"
14
15setupaptarchive
16
17# dpkg freaks out if the last package is removed so keep one around
18aptget install peace-dpkg -y -qq 2>&1 > /dev/null
19testdpkginstalled peace-dpkg
20testmarkedauto
21
22aptget install a -y -qq 2>&1 > /dev/null
23testdpkginstalled a b
24testdpkgnotinstalled c
25testmarkedauto 'b'
26
27aptget remove a -y -qq 2>&1 > /dev/null
28testdpkgnotinstalled a c
29testdpkginstalled b
30testmarkedauto 'b'
31
32aptget install c -y -qq 2>&1 > /dev/null
33testdpkgnotinstalled a
34testdpkginstalled b c
35testmarkedauto 'b'
36
37testequal 'Reading package lists...
38Building dependency tree...
39Reading state information...
40b is already the newest version.
410 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b --only-upgrade
42testmarkedauto 'b'
43
44testequal 'Reading package lists...
45Building dependency tree...
46Reading state information...
47b is already the newest version.
480 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b -d
49testmarkedauto 'b'
50
51rm rootdir/var/log/apt/history.log
52
53aptget install b --reinstall -y -qq 2>&1 > /dev/null
54testdpkgnotinstalled a
55testdpkginstalled b c
56testmarkedauto 'b'
57
58sed -i rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d'
59testfileequal 'rootdir/var/log/apt/history.log' '
60Reinstall: b:i386 (1.0)'
61
62testequal 'Reading package lists...
63Building dependency tree...
64Reading state information...
65b is already the newest version.
66b set to manually installed.
670 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b
68testmarkedauto
69
70aptget remove b -y -qq 2>&1 > /dev/null
71testdpkgnotinstalled a b c
72testmarkedauto
73
74aptget install a b -y -qq 2>&1 > /dev/null
75testdpkginstalled a b
76testdpkgnotinstalled c
77testmarkedauto
78
79aptget purge a b -y -qq 2>&1 > /dev/null
80testdpkgnotinstalled a b c
81testmarkedauto
82
83aptget install b c -y -qq 2>&1 > /dev/null
84testdpkgnotinstalled a
85testdpkginstalled b c
86testmarkedauto
87
88aptget install a -y -qq 2>&1 > /dev/null
89testdpkginstalled a b c
90testmarkedauto