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

Antonio Terceiro terceiro at debian.org
Thu May 28 23:14:29 UTC 2015


On Thu, May 28, 2015 at 09:01:20PM +0200, Johannes Schauer wrote:
> 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 for your insight! I have prepared a new patch, which is attached.
It is actually so simple that maybe it doesn't even warrant new
testcases? (also I couldn't figure out how to test that yet ;-))

With this patch applied I can successfully run the gem2deb test suite
with autopkgtest.

-- 
Antonio Terceiro <terceiro at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Reduce-build-profiles-when-installing-dependencies.patch
Type: text/x-diff
Size: 1204 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/autopkgtest-devel/attachments/20150528/10b0ef43/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/autopkgtest-devel/attachments/20150528/10b0ef43/attachment.sig>


More information about the autopkgtest-devel mailing list