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