]> git.saurik.com Git - apt.git/blob - test/integration/test-bug-720597-build-dep-purge
merge sources.list lines based on Release filename
[apt.git] / test / integration / test-bug-720597-build-dep-purge
1 #!/bin/sh
2 set -e
3
4 TESTDIR="$(readlink -f "$(dirname "$0")")"
5 . "$TESTDIR/framework"
6 setupenvironment
7
8 # we need this construct here as it isn't really possible to fake native arch for dpkg-* tools
9 NATIVE="$(command dpkg --print-architecture)"
10 configarchitecture $NATIVE
11
12 insertinstalledpackage 'build-essential' 'all' '11.5' 'Multi-Arch: foreign'
13 insertinstalledpackage 'pkga' 'all' '1'
14 buildsimplenativepackage 'pkgb' "$NATIVE" '1' 'stable' 'Conflicts: pkga'
15 buildsimplenativepackage 'pkgc' "$NATIVE" '1' 'stable' 'Build-Depends: pkgb'
16
17 setupaptarchive
18
19 testsuccessequal "Reading package lists...
20 Reading package lists...
21 Building dependency tree...
22 The following packages will be REMOVED:
23 pkga
24 The following NEW packages will be installed:
25 pkgb
26 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
27 Remv pkga [1]
28 Inst pkgb (1 stable [$NATIVE])
29 Conf pkgb (1 stable [$NATIVE])" aptget build-dep pkgc -s
30
31 testsuccessequal "Reading package lists...
32 Reading package lists...
33 Building dependency tree...
34 The following packages will be REMOVED:
35 pkga*
36 The following NEW packages will be installed:
37 pkgb
38 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
39 Purg pkga [1]
40 Inst pkgb (1 stable [$NATIVE])
41 Conf pkgb (1 stable [$NATIVE])" aptget build-dep pkgc -s --purge
42
43 testsuccessequal 'Reading package lists...
44 Building dependency tree...
45 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' apt autoremove -s
46 testdpkgnotinstalled pkgb
47 testsuccess apt build-dep pkgc -y -o Debug::pkgDepCache::AutoInstall=1 -o Debug::pkgDepCache::Marker=1
48 testdpkginstalled pkgb
49 testsuccessequal 'Reading package lists...
50 Building dependency tree...
51 Reading state information...
52 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' apt autoremove -s
53 testsuccess apt purge pkgb pkgc -y
54 testsuccessequal 'Reading package lists...
55 Building dependency tree...
56 Reading state information...
57 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' apt autoremove -s
58 testsuccess apt build-dep pkgc -y -o APT::Get::Build-Dep-Automatic=true
59 testsuccessequal 'Reading package lists...
60 Building dependency tree...
61 Reading state information...
62 The following packages will be REMOVED:
63 pkgb
64 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
65 Remv pkgb [1]' apt autoremove -s