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

Daniel Stender stender at debian.org
Fri Apr 15 08:40:51 UTC 2016


On 15.04.2016 00:41, Ximin Luo wrote:
> 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. :(

Yes, it would be best if this could be solved upstream. I've filed an issue of this [1] and will take if look if
we could provide a patch to replace github.com/mitchellh/packer/common/uuid. Thx for comments.

DS

[1] https://github.com/packer-community/winrmcp/issues/12

-- 
4096R/DF5182C8
http://www.danielstender.com/blog/




More information about the Pkg-go-maintainers mailing list