]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-get-build-dep
test-apt-download-progress: Allow smaller progress change
[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
7414af7f 8configarchitecture 'i386'
feab34c5 9
7414af7f
DK
10insertpackage 'stable' 'debhelper' 'i386' '7'
11insertpackage 'stable' 'build-essential' 'i386' '1'
12insertinstalledpackage 'build-conflict' 'i386' '1'
feab34c5
MV
13
14setupaptarchive
7414af7f
DK
15
16msgmsg 'Test with' 'unsigned dsc'
feab34c5
MV
17cat > 2vcard_0.5-3.dsc <<EOF
18Format: 1.0
19Source: 2vcard
20Binary: 2vcard
21Architecture: all
22Version: 0.5-3
23Maintainer: Martin Albisetti <argentina@gmail.com>
24Uploaders: Marcela Tiznado <mlt@debian.org>
25Standards-Version: 3.8.0
26Build-Depends: debhelper (>= 5.0.37)
7414af7f 27Build-Conflicts: build-conflict (<< 2)
feab34c5
MV
28Checksums-Sha1:
29 b7f1ce31ec856414a3f0f1090689f91aa7456d56 9398 2vcard_0.5.orig.tar.gz
30 5f9acd07ebda6ab00fa6b4fe3198c13e94090862 2036 2vcard_0.5-3.diff.gz
31Checksums-Sha256:
32 efdc22859ac2f8f030d038dc4faa9020082ebae34212498c288968ffd45c9764 9398 2vcard_0.5.orig.tar.gz
33 82673ff3456af571094066c89bcea87b25c23c87cf1d0050b731e5222563626b 2036 2vcard_0.5-3.diff.gz
34Files:
35 f73a69c170f772f3f6e75f2d11bbb792 9398 2vcard_0.5.orig.tar.gz
36 1e806d32233af87437258d86b1561f57 2036 2vcard_0.5-3.diff.gz
37EOF
38
7414af7f
DK
39test2vcardbuilddep() {
40 testsuccessequal "Reading package lists...
feab34c5 41Building dependency tree...
f359b7e8 42Note, using file './2vcard_0.5-3.dsc' to get the build dependencies
7414af7f
DK
43The following packages will be REMOVED:
44 build-conflict
feab34c5
MV
45The following NEW packages will be installed:
46 build-essential debhelper
7414af7f
DK
470 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
48Remv build-conflict [1]
feab34c5
MV
49Inst build-essential (1 stable [i386])
50Inst debhelper (7 stable [i386])
51Conf build-essential (1 stable [i386])
f359b7e8
DK
52Conf debhelper (7 stable [i386])" aptget build-dep -s ./2vcard_0.5-3.dsc
53testfailure aptget build-dep --simulate 2vcard_0.5-3.dsc
54cd downloaded
55testsuccess aptget build-dep --simulate ../2vcard_0.5-3.dsc
56testsuccess aptget build-dep --simulate "$(readlink -f ../2vcard_0.5-3.dsc)"
57cd ..
7414af7f
DK
58}
59test2vcardbuilddep
feab34c5 60
7414af7f 61msgmsg 'Test with' 'signed dsc'
feab34c5
MV
62cat > 2vcard_0.5-3.dsc <<EOF
63-----BEGIN PGP SIGNED MESSAGE-----
64Hash: SHA1
65
66Format: 1.0
67Source: 2vcard
68Binary: 2vcard
69Architecture: all
70Version: 0.5-3
71Maintainer: Martin Albisetti <argentina@gmail.com>
72Uploaders: Marcela Tiznado <mlt@debian.org>
73Standards-Version: 3.8.0
74Build-Depends: debhelper (>= 5.0.37)
7414af7f 75Build-Conflicts: build-conflict (<< 2)
feab34c5
MV
76Checksums-Sha1:
77 b7f1ce31ec856414a3f0f1090689f91aa7456d56 9398 2vcard_0.5.orig.tar.gz
78 5f9acd07ebda6ab00fa6b4fe3198c13e94090862 2036 2vcard_0.5-3.diff.gz
79Checksums-Sha256:
80 efdc22859ac2f8f030d038dc4faa9020082ebae34212498c288968ffd45c9764 9398 2vcard_0.5.orig.tar.gz
81 82673ff3456af571094066c89bcea87b25c23c87cf1d0050b731e5222563626b 2036 2vcard_0.5-3.diff.gz
82Files:
83 f73a69c170f772f3f6e75f2d11bbb792 9398 2vcard_0.5.orig.tar.gz
84 1e806d32233af87437258d86b1561f57 2036 2vcard_0.5-3.diff.gz
85
86-----BEGIN PGP SIGNATURE-----
87Version: GnuPG v1.4.9 (GNU/Linux)
88
89iEYEARECAAYFAkijKhsACgkQsrBfRdYmq7aA2gCfaOW9riTYVQMx5ajKQVAcctlC
90z2UAn1oXgTai6opwhVfkxrlmJ+iRxzuc
91=4eRd
92-----END PGP SIGNATURE-----
93EOF
7414af7f 94test2vcardbuilddep
77da39b9
MV
95
96
7414af7f 97msgmsg 'Test with' 'unpacked source dir'
77da39b9
MV
98mkdir -p foo-1.0/debian
99cat > foo-1.0/debian/control <<'EOF'
100Source: apturl
101Section: admin
102Priority: optional
103Maintainer: Michael Vogt <mvo@ubuntu.com>
104Build-Depends: debhelper (>= 7)
105X-Python3-Version: >= 3.2
106Standards-Version: 3.9.3
107
108Package: apturl-common
109Architecture: any
110Depends: ${python3:Depends},
111 ${shlibs:Depends},
112 ${misc:Depends},
113 python3-apt,
114 python3-update-manager
115Replaces: apturl (<< 0.3.6ubuntu2)
116Description: install packages using the apt protocol - common data
117 AptUrl is a simple graphical application that takes an URL (which follows the
118 apt-protocol) as a command line option, parses it and carries out the
119 operations that the URL describes (that is, it asks the user if he wants the
120 indicated packages to be installed and if the answer is positive does so for
121 him).
122 .
123 This package contains the common data shared between the frontends.
124
125EOF
126
25b86db1 127testsuccessequal "Reading package lists...
77da39b9 128Building dependency tree...
a5bb5e1e 129Note, using directory './foo-1.0' to get the build dependencies
77da39b9
MV
130The following NEW packages will be installed:
131 build-essential debhelper
1320 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
133Inst build-essential (1 stable [i386])
134Inst debhelper (7 stable [i386])
135Conf build-essential (1 stable [i386])
136Conf debhelper (7 stable [i386])" aptget build-dep --simulate ./foo-1.0
f359b7e8
DK
137testfailure aptget build-dep --simulate foo-1.0
138cd downloaded
139testsuccess aptget build-dep --simulate ../foo-1.0
140testsuccess aptget build-dep --simulate "$(readlink -f ../foo-1.0)"
141cd ..
7414af7f
DK
142
143testfailureequal 'Reading package lists...
144Building dependency tree...
145E: Must specify at least one package to check builddeps for' aptget build-dep
146testfailureequal 'Reading package lists...
147Building dependency tree...
148E: No architecture information available for armel. See apt.conf(5) APT::Architectures for setup' aptget build-dep --simulate ./foo-1.0 -a armel
149testfailureequal 'Reading package lists...
150Building dependency tree...
151E: Unable to find a source package for foo' aptget build-dep --simulate foo