summaryrefslogtreecommitdiffstats
path: root/test/integration/test-apt-move-and-forget-manual-sections
blob: ab90be0c0e50e8b3491adec7ea3a0c16241c4d46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/sh
set -e

TESTDIR="$(readlink -f "$(dirname "$0")")"
. "$TESTDIR/framework"
setupenvironment
configarchitecture 'native'

aptconfig dump --no-empty --format '%v%n' APT::Move-Autobit-Sections > move-autobit.sections
testsuccess grep '^oldlibs$' move-autobit.sections

buildsimplenativepackage 'libabc' 'native' '1' 'stable' '' '' 'libs'
buildsimplenativepackage 'libabc' 'native' '2' 'unstable' 'Depends: libdef' '' 'oldlibs'
buildsimplenativepackage 'libzoo' 'native' '1' 'stable' '' '' 'libs'
buildsimplenativepackage 'libzoo' 'native' '2' 'unstable' 'Depends: libdef' '' 'non-free/oldlibs'
buildsimplenativepackage 'libdef' 'native' '1' 'unstable' '' '' 'libs'
setupaptarchive

testmarkedauto
testmarkedmanual

msgmsg 'Move bit on install of replacement'
testsuccess aptget install libabc/stable -y
testdpkginstalled 'libabc'
testdpkgnotinstalled 'libdef' 'libzoo'

testmarkedmanual 'libabc'
testmarkedauto

testsuccess aptget dist-upgrade -y
testdpkginstalled 'libabc' 'libdef'

testmarkedauto 'libabc'
testmarkedmanual 'libdef'

testsuccess apt autopurge -y
testdpkgnotinstalled 'libabc' 'libzoo'

msgmsg 'Do not move bit if replacement is already installed'
testsuccess aptget install libzoo/stable -y
testdpkginstalled 'libzoo'

testmarkedmanual 'libzoo' 'libdef'
testmarkedauto

testsuccess aptmark auto libdef
testmarkedauto 'libdef'

testsuccess aptget dist-upgrade -y
testdpkginstalled 'libzoo' 'libdef'

testmarkedmanual 'libzoo'
testmarkedauto 'libdef'

testsuccess apt autopurge -y libzoo-
testdpkgnotinstalled 'libabc' 'libzoo' 'libdef'

msgmsg 'Move bit on install of replacement (subsection)'
testfailure grep '^non-free/oldlibs$' move-autobit.sections
testsuccess aptget install libzoo/stable -y
testdpkginstalled 'libzoo'
testdpkgnotinstalled 'libdef' 'libabc'

testmarkedmanual 'libzoo'
testmarkedauto

testsuccess aptget dist-upgrade -y
testdpkginstalled 'libzoo' 'libdef'

testmarkedauto 'libzoo'
testmarkedmanual 'libdef'

testsuccess apt autopurge -y
testdpkgnotinstalled 'libabc' 'libzoo'