[pkg-go] a mutual dependency problem (Packer)

Ximin Luo infinity0 at debian.org
Thu Apr 14 22:41:55 UTC 2016


Daniel Stender:
> Hi,
> 
> there's a problem with packaging Packer [1]: github-packer-community-winrmcp [2] needs
> the sources of Packer (import "github.com/mitchellh/packer/common/uuid"), while Packer
> needs the sources of winrmcp (import "github.com/packer-community/winrmcp/winrmcp") [3],
> so there's a mutual dependency.
> 
> Both packages are going to have two binary packages, one carrying the compiled application
> and another "-dev" package carrying just the source (like Consul [3] and winrm [4]).
> 
> I have an idea but wanted to poll, how could get they both in the best way?
> 
> Thanks in advance,
> Daniel Stender
> 
> [1] https://bugs.debian.org/740753 (Packer ITP)
> 
> [2] https://bugs.debian.org/809051 (winrmcp ITP)
> 
> [3] https://tracker.debian.org/pkg/consul
> 
> [4] https://tracker.debian.org/pkg/golang-github-masterzen-winrm
> 

The only clean way is to fix it upstream. Circular build dependencies make lots of things stupidly painful and require extra tooling to handle. Sometimes it's necessary like for compilers[1] but most projects aren't special snowflakes like that.

If you really must (i.e. you failed to convince either upstream after lots of trying) you can try to break the circle by building parts of one of the packages using "build profiles", search for DEB_BUILD_PROFILE. The idea is to build a subcomponent of one package using a special profile, that gives you something to bootstrap the other one with. I don't know the details myself though.

X

[1] and even in this case it ideally should be a self-dependency, i.e. a cycle of size 1 not >1. I hear rustc is headed in the opposite direction. :(

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
git://github.com/infinity0/pubkeys.git



More information about the Pkg-go-maintainers mailing list