[pkg-go] [PATCH] Compute Built-Using with go list, not Build-Depends

Tianon Gravi admwiggin at gmail.com
Thu Apr 14 22:46:32 UTC 2016


On 13 April 2016 at 17:43, Michael Hudson-Doyle
<michael.hudson at canonical.com> wrote:
> @@ -156,7 +161,6 @@ sub get_targets {
>  sub build {
>      my $this = shift;
>
> -    $ENV{GOPATH} = $this->{cwd} . '/' . $this->get_builddir();
>      if (exists($ENV{DH_GOLANG_GO_GENERATE}) && $ENV{DH_GOLANG_GO_GENERATE} == 1) {
>          $this->doit_in_builddir("go", "generate", "-v", @_, get_targets());
>      }
> @@ -166,7 +170,7 @@ sub build {
>  sub test {
>      my $this = shift;
>
> -    $ENV{GOPATH} = $this->{cwd} . '/' . $this->get_builddir();
> +    $this->_set_gopath();
>      $this->doit_in_builddir("go", "test", "-v", @_, get_targets());
>  }

I think this block is why that latest upload is causing everything to
fail to build -- we removed GOPATH from "sub build", but didn't add
"_set_gopath" like we did down in "sub test" to replace it, ala:

--- a/lib/Debian/Debhelper/Buildsystem/golang.pm
+++ b/lib/Debian/Debhelper/Buildsystem/golang.pm
@@ -161,6 +161,7 @@ sub get_targets {
 sub build {
     my $this = shift;

+    $this->_set_gopath();
     if (exists($ENV{DH_GOLANG_GO_GENERATE}) &&
$ENV{DH_GOLANG_GO_GENERATE} == 1) {
         $this->doit_in_builddir("go", "generate", "-v", @_, get_targets());
     }



♥,
- Tianon
  4096R / B42F 6819 007F 00F8 8E36  4FD4 036A 9C25 BF35 7DD4



More information about the Pkg-go-maintainers mailing list