]> git.saurik.com Git - apt.git/blame - test/integration/test-bug-611729-mark-as-manual
use apt-mark instead of hand-mangling with the extended_states file
[apt.git] / test / integration / test-bug-611729-mark-as-manual
CommitLineData
eb76e936
DK
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
ec7f904e 20testmarkedauto
eb76e936
DK
21
22aptget install a -y -qq 2>&1 > /dev/null
23testdpkginstalled a b
24testdpkgnotinstalled c
ec7f904e 25testmarkedauto 'b'
eb76e936
DK
26
27aptget remove a -y -qq 2>&1 > /dev/null
28testdpkgnotinstalled a c
29testdpkginstalled b
ec7f904e 30testmarkedauto 'b'
eb76e936
DK
31
32aptget install c -y -qq 2>&1 > /dev/null
33testdpkgnotinstalled a
34testdpkginstalled b c
ec7f904e 35testmarkedauto 'b'
eb76e936
DK
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
ec7f904e 42testmarkedauto 'b'
eb76e936
DK
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
ec7f904e 49testmarkedauto 'b'
eb76e936
DK
50
51aptget install b --reinstall -y -qq 2>&1 > /dev/null
52testdpkgnotinstalled a
53testdpkginstalled b c
ec7f904e 54testmarkedauto 'b'
eb76e936
DK
55
56testequal 'Reading package lists...
57Building dependency tree...
58Reading state information...
59b is already the newest version.
60b set to manually installed.
610 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b
ec7f904e 62testmarkedauto
eb76e936
DK
63
64aptget remove b -y -qq 2>&1 > /dev/null
65testdpkgnotinstalled a b c
ec7f904e 66testmarkedauto
eb76e936
DK
67
68aptget install a b -y -qq 2>&1 > /dev/null
69testdpkginstalled a b
70testdpkgnotinstalled c
ec7f904e 71testmarkedauto
eb76e936
DK
72
73aptget purge a b -y -qq 2>&1 > /dev/null
74testdpkgnotinstalled a b c
ec7f904e 75testmarkedauto
eb76e936
DK
76
77aptget install b c -y -qq 2>&1 > /dev/null
78testdpkgnotinstalled a
79testdpkginstalled b c
ec7f904e 80testmarkedauto
eb76e936
DK
81
82aptget install a -y -qq 2>&1 > /dev/null
83testdpkginstalled a b c
ec7f904e 84testmarkedauto