]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-get-build-dep
adapt to the new CacheSetHelper API
[apt.git] / test / integration / test-apt-get-build-dep
CommitLineData
feab34c5
MV
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6
7setupenvironment
8configarchitecture "i386"
9
10buildsimplenativepackage 'debhelper' 'i386' '7' 'stable'
11buildsimplenativepackage 'build-essential' 'i386' '1' 'stable'
12
13setupaptarchive
14cat > 2vcard_0.5-3.dsc <<EOF
15Format: 1.0
16Source: 2vcard
17Binary: 2vcard
18Architecture: all
19Version: 0.5-3
20Maintainer: Martin Albisetti <argentina@gmail.com>
21Uploaders: Marcela Tiznado <mlt@debian.org>
22Standards-Version: 3.8.0
23Build-Depends: debhelper (>= 5.0.37)
24Checksums-Sha1:
25 b7f1ce31ec856414a3f0f1090689f91aa7456d56 9398 2vcard_0.5.orig.tar.gz
26 5f9acd07ebda6ab00fa6b4fe3198c13e94090862 2036 2vcard_0.5-3.diff.gz
27Checksums-Sha256:
28 efdc22859ac2f8f030d038dc4faa9020082ebae34212498c288968ffd45c9764 9398 2vcard_0.5.orig.tar.gz
29 82673ff3456af571094066c89bcea87b25c23c87cf1d0050b731e5222563626b 2036 2vcard_0.5-3.diff.gz
30Files:
31 f73a69c170f772f3f6e75f2d11bbb792 9398 2vcard_0.5.orig.tar.gz
32 1e806d32233af87437258d86b1561f57 2036 2vcard_0.5-3.diff.gz
33EOF
34
35testequal "Reading package lists...
36Building dependency tree...
a5bb5e1e 37Note, using file '2vcard_0.5-3.dsc' to get the build dependencies
feab34c5
MV
38The following NEW packages will be installed:
39 build-essential debhelper
400 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
41Inst build-essential (1 stable [i386])
42Inst debhelper (7 stable [i386])
43Conf build-essential (1 stable [i386])
44Conf debhelper (7 stable [i386])" aptget build-dep -s 2vcard_0.5-3.dsc
45
46cat > 2vcard_0.5-3.dsc <<EOF
47-----BEGIN PGP SIGNED MESSAGE-----
48Hash: SHA1
49
50Format: 1.0
51Source: 2vcard
52Binary: 2vcard
53Architecture: all
54Version: 0.5-3
55Maintainer: Martin Albisetti <argentina@gmail.com>
56Uploaders: Marcela Tiznado <mlt@debian.org>
57Standards-Version: 3.8.0
58Build-Depends: debhelper (>= 5.0.37)
59Checksums-Sha1:
60 b7f1ce31ec856414a3f0f1090689f91aa7456d56 9398 2vcard_0.5.orig.tar.gz
61 5f9acd07ebda6ab00fa6b4fe3198c13e94090862 2036 2vcard_0.5-3.diff.gz
62Checksums-Sha256:
63 efdc22859ac2f8f030d038dc4faa9020082ebae34212498c288968ffd45c9764 9398 2vcard_0.5.orig.tar.gz
64 82673ff3456af571094066c89bcea87b25c23c87cf1d0050b731e5222563626b 2036 2vcard_0.5-3.diff.gz
65Files:
66 f73a69c170f772f3f6e75f2d11bbb792 9398 2vcard_0.5.orig.tar.gz
67 1e806d32233af87437258d86b1561f57 2036 2vcard_0.5-3.diff.gz
68
69-----BEGIN PGP SIGNATURE-----
70Version: GnuPG v1.4.9 (GNU/Linux)
71
72iEYEARECAAYFAkijKhsACgkQsrBfRdYmq7aA2gCfaOW9riTYVQMx5ajKQVAcctlC
73z2UAn1oXgTai6opwhVfkxrlmJ+iRxzuc
74=4eRd
75-----END PGP SIGNATURE-----
76EOF
77
78testequal "Reading package lists...
79Building dependency tree...
a5bb5e1e 80Note, using file '2vcard_0.5-3.dsc' to get the build dependencies
feab34c5
MV
81The following NEW packages will be installed:
82 build-essential debhelper
830 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
84Inst build-essential (1 stable [i386])
85Inst debhelper (7 stable [i386])
86Conf build-essential (1 stable [i386])
87Conf debhelper (7 stable [i386])" aptget build-dep --simulate 2vcard_0.5-3.dsc
77da39b9
MV
88
89
90# unpacked source dir
91mkdir -p foo-1.0/debian
92cat > foo-1.0/debian/control <<'EOF'
93Source: apturl
94Section: admin
95Priority: optional
96Maintainer: Michael Vogt <mvo@ubuntu.com>
97Build-Depends: debhelper (>= 7)
98X-Python3-Version: >= 3.2
99Standards-Version: 3.9.3
100
101Package: apturl-common
102Architecture: any
103Depends: ${python3:Depends},
104 ${shlibs:Depends},
105 ${misc:Depends},
106 python3-apt,
107 python3-update-manager
108Replaces: apturl (<< 0.3.6ubuntu2)
109Description: install packages using the apt protocol - common data
110 AptUrl is a simple graphical application that takes an URL (which follows the
111 apt-protocol) as a command line option, parses it and carries out the
112 operations that the URL describes (that is, it asks the user if he wants the
113 indicated packages to be installed and if the answer is positive does so for
114 him).
115 .
116 This package contains the common data shared between the frontends.
117
118EOF
119
120testequal "Reading package lists...
121Building dependency tree...
a5bb5e1e 122Note, using directory './foo-1.0' to get the build dependencies
77da39b9
MV
123The following NEW packages will be installed:
124 build-essential debhelper
1250 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
126Inst build-essential (1 stable [i386])
127Inst debhelper (7 stable [i386])
128Conf build-essential (1 stable [i386])
129Conf debhelper (7 stable [i386])" aptget build-dep --simulate ./foo-1.0