Source: golang-github-prometheus-common
Version: 0.69.0-1
Severity: normal

The sources installed by golang-github-prometheus-common-dev and the
go.mod installed next to them disagree about kingpin:

  promslog/flag/flag.go:23   kingpin "gopkg.in/alecthomas/kingpin.v2"
  go.mod:6                   github.com/alecthomas/kingpin/v2 v2.4.0

A GOPATH build never reads that go.mod, so the mismatch is invisible. A
module-aware build reads it and stops with:

  no required module provides package gopkg.in/alecthomas/kingpin.v2

so promslog/flag cannot be used from any package built with dh-go. I hit
it while measuring a dh-go port of prometheus-alertmanager.

The import rewrite is no longer needed. golang-gopkg-alecthomas-kingpin.v2-dev
2.4.0-1 installs the real module at
usr/share/gocode/src/github.com/alecthomas/kingpin/v2/ with its own
go.mod, and keeps gopkg.in/alecthomas/kingpin.v2 as a symlink to it. So
upstream's own import path resolves in both build modes today, and
reverting the rewrite would fix this without breaking GOPATH consumers.

The same rewrite is applied across the archive, about 40 source packages
in sid build-depend on golang-gopkg-alecthomas-kingpin.v2-dev, so this
will come up again as packages move to dh-go. I am reporting it here because
prometheus-common is the one that blocks first, being a dependency of
most of them.

Juan

Reply via email to