summaryrefslogtreecommitdiffstats
path: root/test/integration/test-apt-get-autoremove-real-virtual-provider
blob: d5438f8b359d3314825e68dab120f75ed76a737b (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
#!/bin/sh
set -e

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

insertinstalledpackage 'needs' 'all' '1'
insertinstalledpackage 'needs-provider1' 'all' '1' 'Provides: needs (= 1)'
insertinstalledpackage 'needs-provider2' 'all' '1' 'Provides: needs (= 2)'
insertinstalledpackage 'needs-provider3' 'all' '1' 'Provides: needs (= 3)'
insertinstalledpackage 'needs-provider4' 'all' '1' 'Provides: needs (= 4)'

insertinstalledpackage 'foo' 'all' '1' 'Depends: needs (= 1), needs (= 2), needs (= 3)'

testsuccess aptmark auto 'needs*'
testsuccessequal 'needs
needs-provider1
needs-provider2
needs-provider3
needs-provider4' aptmark showauto

testsuccess aptget check -s

testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
Solving dependencies...
The following packages will be REMOVED:
  needs-provider1 needs-provider4
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
Remv needs-provider1 [1]
Remv needs-provider4 [1]' aptget autoremove -s --solver 3.0

testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
  needs-provider4
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Remv needs-provider4 [1]' aptget autoremove -s --solver internal