Package: dh-go
Version: 1.71
Severity: important
Tags: patch

_create_go_work_file looks for the go.mod of each target by walking up the
parent directories:

    $module = dirname($module)
      while $module ne '.'
      and not -e "$builddir/src/$module/go.mod";

That dirname is the one Debian::Debhelper::Dh_Lib exports, and it returns its
argument unchanged when there is no slash in it. So an import path of a single
segment never reaches '.', the loop never ends, and the search of the child
directories right below it never runs. The loop came in with 1.70.

Measured with a package whose XS-Go-Import-Path is privado.ai and whose go.mod
is in go-astgen/, which is the shape of the goastgen packaging.
dh_auto_configure under timeout 20 gives rc 124 with 1.71 from the archive and
rc 0 with the patch, writing "use ./src/privado.ai/go-astgen". No regression:
golang-opentelemetry-otel 1.46.0-3 built against the patched dh-go gives Status
successful, Lintian successful, 125 packages ok and 0 FAIL, the same as its
baseline.

Patch: https://salsa.debian.org/go-team/dh-go/-/merge_requests/15

Reply via email to