On 2 May 2016 at 13:59, Michael Hudson-Doyle <michael.hud...@canonical.com> wrote: > Hm, is there actually any case where Depends (or at least > golang-*-dev) and Build-Depends would differ? dh_golang could just > copy one to the other...
There's some packages where these two fields differ for a good reason. A good example can be found in the consul package, and in particular this commit: https://salsa.debian.org/go-team/packages/consul/commit/1b8be7f0 Before this commit, the whole source code of consul was shipped in the -dev package, but the problem is that we ended up with circular dependencies. The consul command depends on docker, and docker depends on the consul library. So this commit tackle that, by only shipping a subset of consul in the -dev package, only the parts that make sense in a library. This solves the circular dependencies, and also it reduces the dependency graph of the -dev package, which is always good to take. My conclusion is that there's two cases to consider: 1. If the package is *only* a library, then the Build-Depends of the source package and the Depends of the -dev package are probably identical (except for a few packages like debhelper, which should be filtered out). In this situation, using a substvar generated by dh_golang would surely be helpful. 2. If the package provides both an application and a library, and the library only ships a subset of the source code, then Depends and Build-Depends are different. The most simple in this case is to let the maintainer handle that manually, although I agree it's error prone. Best, Arnaud