Bug#801894: autopkgtest: Support conditional dependencies

Martin Pitt mpitt at debian.org
Wed Oct 21 07:41:16 UTC 2015


Control: severity -1 wishlist

Barry Warsaw [2015-10-15 13:48 -0400]:
> With python-pex, an extra dependency is required on Ubuntu that isn't
> required on Debian.  Originally I was keeping an Ubuntu delta that
> only differed by including the extra dependency in d/tests/control.

Out of interest, this does sound like a bug, no? Is the binary you are
testing perhaps missing that dependency? If the test is exactly the
same then the dependencies ought to be too?

I suppose that extra dependency is not available in Debian. You could
use something like

  Depends: ubuntu-only-package | aspell-doc

i. e. alternatively depend on something which you don't need and which
isn't already installed in minimal testbeds. With that you can get the
effect with today's autopkgtest.

> My thinking now is that perhaps something like
> 
> Depends-<vendor>: foo
> 
> e.g.
> 
> Depends-Ubuntu: foo
> 
> could work.

It could, but that smells like an use case which we'd probably use
once in the entire archive, and it's quite some work to implement.

If we need to take diversion between Debian and derivatives into
account, then maybe this should be done more generally, similarly to
deiban/patches/series.ubuntu? E. g. there could be a
debian/tests/control.<dpkg vendor name>, and if that doesn't exist,
fall back to the usual debian/tests/control ?

While that would mean more duplication in your particular case (take
it as motivation to fix that delta :), and it really smells like a
bug) it might also help with some other use cases, like you want to
run different tests on Debian and Ubuntu.

> Maybe you want to generalize that into any conditional,
> so for example:
> 
> Depends: @, (dpkg-vendor --is ubuntu) foo, blah

I don't want to do that, as dpkg/apt can't understand this.

To be honest, I'm still sceptical about this as it feels like
overgeneralizing a workaround for one bug; but I keep it open as
wishlist for now.

Thanks,

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
-------------- 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/20151021/7a826f86/attachment.sig>


More information about the autopkgtest-devel mailing list