Bug#787093: autopkgtest: dpkg-deb chokes with build profiles in Build-Depends:

Johannes Schauer josch at debian.org
Thu May 28 19:01:20 UTC 2015


Hi,

that patch just drops the restriction formula (the part between the <>
"brackets"). Have a look in the example I gave in this email:

http://lists.debian.org/20150528142653.2580.4450@hoothoot

to see how this leads to wrong results.

Instead, autopkgtest should parse and evaluate the build dependencies with
their restriction formula as if no build profiles are active.

To my knowledge, the only logic to do this properly currently exists in
dpkg-dev, apt and dose3. Since you are already using Dpkg::Deps::deps_parse()
in ./runner/adt-run you could just re-use the same method in ./lib/testdesc.py

For a testcase you might want to try:

+    def test_builddeps_with_build_profiles(self):
+        (ts, skipped) = self.call_parse(
+            'Tests: t\nDepends: @, @builddeps@',
+            'Source: nums\nBuild-Depends: bd1, bd2 <stage1> <cross>\n'
+            '\n'
+            'Package: one\nArchitecture: any')
+        self.assertEqual(ts[0].depends, ['one (>= 0~)', 'bd1',
+                                         'build-essential'])
+        self.assertFalse(skipped)
+

I also added autopkgtest to the list in the spec: https://wiki.debian.org/BuildProfileSpec

Thanks!

cheers, josch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: signature
URL: <http://lists.alioth.debian.org/pipermail/autopkgtest-devel/attachments/20150528/058af03a/attachment.sig>


More information about the autopkgtest-devel mailing list