Package: dh-go
Version: 1.69
Severity: normal

The check added in 1.69 reads the go.mod from the build directory:

  my $gomodfile = $this->get_buildpath('go.mod');
  if (!-e $gomodfile) {
      warning("package does not provide 'go.mod', please add it.");
      return;
  }

get_buildpath returns the build directory when there is one, and
DEFAULT_BUILD_DIRECTORY is _build for compat 14 and later. The sources are
copied to _build/src/$DH_GOPKG, so _build/go.mod never exists. For every
package at compat 14 the check therefore returns early without comparing
anything, and the log gets a warning saying the package provides no go.mod
while it does ship one.

Please read it from the source directory instead:

--- a/lib/Debian/Debhelper/Buildsystem/golang.pm
+++ b/lib/Debian/Debhelper/Buildsystem/golang.pm
@@
-    my $gomodfile = $this->get_buildpath('go.mod');
+    my $gomodfile = $this->get_sourcepath('go.mod');

Reply via email to