[pkg-go] Bug#822668: Processed: cloning 822386, reassign -1 to dh-golang ..., severity of -1 is important

Michael Stapelberg stapelberg at debian.org
Tue Jun 20 07:46:09 UTC 2017


control: severity -1 wishlist
control: retitle -1 Make dh_golang work without --buildsystem golang

Hi,

Michael Hudson-Doyle <michael.hudson at canonical.com> writes:

> On 27 April 2016 at 19:22, Michael Stapelberg <stapelberg at debian.org> wrote:
>> Can you please explain why dh-golang can’t be made to figure out build
>> dependencies in this particular case?
>
> Because nothing in the packaging tells dh-golang anything about the Go
> bits -- it doesn't set DH_GOPKG or Xs-Go-Import-Path or use the golang
> dh buildsystem. I guess we could put back the
> built-using-from-Build-Depends code and use both that *and* the go
> list-using code I added...

So, if I understand correctly, the use-case here was to use only the
dh_golang binary (dh --with golang, responsible for adding the
misc:Built-Using substvar) without the rest of the debhelper golang
build system (dh --buildsystem golang).

The dh_golang binary currently overwrites GOPATH (by calling
load_buildsystem("golang")->_set_gopath()), then runs 'go list' to find
all packages, then proceeds to construct a Built-Using substvar.

We could introduce an environment variable which overrides the packages,
so that dh_golang can be used without --buildsystem golang (retitled the
bug accordingly).

Since knot-resolver does not contain any Go modules anymore (tinyweb has
been superseded by the HTTP/2 module as per the debian/changelog), I’ll
not spend any time on this theoretical exercise.

If anyone else has the same use-case and would actually like to see this
issue resolved, please speak up.

-- 
Best regards,
Michael



More information about the Pkg-go-maintainers mailing list