4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
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
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'
19 testsuccessequal "Reading package lists...
20 Reading package lists...
21 Building dependency tree...
22 The following packages will be REMOVED
:
24 The following NEW packages will be installed
:
26 0 upgraded
, 1 newly installed
, 1 to remove and
0 not upgraded.
28 Inst pkgb
(1 stable
[$NATIVE])
29 Conf pkgb
(1 stable
[$NATIVE])" aptget build-dep pkgc -s
31 testsuccessequal "Reading package lists...
32 Reading package lists...
33 Building dependency tree...
34 The following packages will be REMOVED
:
36 The following NEW packages will be installed
:
38 0 upgraded
, 1 newly installed
, 1 to remove and
0 not upgraded.
40 Inst pkgb
(1 stable
[$NATIVE])
41 Conf pkgb
(1 stable
[$NATIVE])" aptget build-dep pkgc -s --purge
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:
64 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
65 Remv pkgb [1]' apt autoremove -s