]>
Commit | Line | Data |
---|---|---|
f42f6ef0 MV |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
3abb6a6a DK |
4 | TESTDIR="$(readlink -f "$(dirname "$0")")" |
5 | . "$TESTDIR/framework" | |
f42f6ef0 | 6 | setupenvironment |
e457c941 JAK |
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 | |
f42f6ef0 MV |
11 | |
12 | insertinstalledpackage 'build-essential' 'all' '11.5' 'Multi-Arch: foreign' | |
13 | insertinstalledpackage 'pkga' 'all' '1' | |
e457c941 JAK |
14 | buildsimplenativepackage 'pkgb' "$NATIVE" '1' 'stable' 'Conflicts: pkga' |
15 | buildsimplenativepackage 'pkgc' "$NATIVE" '1' 'stable' 'Build-Depends: pkgb' | |
f42f6ef0 MV |
16 | |
17 | setupaptarchive | |
18 | ||
e457c941 | 19 | testsuccessequal "Reading package lists... |
a249b3e6 | 20 | Reading package lists... |
f42f6ef0 MV |
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] | |
e457c941 JAK |
28 | Inst pkgb (1 stable [$NATIVE]) |
29 | Conf pkgb (1 stable [$NATIVE])" aptget build-dep pkgc -s | |
f42f6ef0 | 30 | |
e457c941 | 31 | testsuccessequal "Reading package lists... |
a249b3e6 | 32 | Reading package lists... |
f42f6ef0 MV |
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] | |
e457c941 JAK |
40 | Inst pkgb (1 stable [$NATIVE]) |
41 | Conf pkgb (1 stable [$NATIVE])" aptget build-dep pkgc -s --purge | |
c97ae2a0 DK |
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 |