Package: dh-go
Severity: important

On the debian/sid branch, bin/dh_golang line 80 calls $bs->set_go_env(),
which https://salsa.debian.org/go-team/dh-go/-/commit/260d81a removed from
lib/Debian/Debhelper/Buildsystem/golang.pm. Every package that reaches
dh_golang through the golang sequence then fails with

  Can't locate object method "set_go_env" via package
  "Debian::Debhelper::Buildsystem::golang" at /usr/bin/dh_golang line 80.

1.68 in unstable is unaffected, so this only needs fixing before 1.69.
Please apply the patch below. It restores the method as a wrapper and
leaves the behaviour of pre_building_step() unchanged.

--- a/lib/Debian/Debhelper/Buildsystem/golang.pm
+++ b/lib/Debian/Debhelper/Buildsystem/golang.pm
@@ -351,7 +351,16 @@
 
     $this->SUPER::pre_building_step(@_);
 
-    # Set up the golang build environment
+    $this->set_go_env();
+
+    return;
+}
+
+# Set up the golang build environment. Also called directly by dh_golang,
+# which does not run a build step.
+sub set_go_env {
+    my $this = shift;
+
     $this->_set_dh_gopkg();
     $this->_set_gopath();
     $this->_set_gocache();

Reply via email to