[pkg-go] Bug#1025334: Update binary package and XS-Go-Import-Path to match go.mod

Shengjing Zhu zhsj at debian.org
Sat Dec 3 07:18:39 GMT 2022


On Sat, Dec 3, 2022 at 2:00 AM Pirate Praveen <praveen at onenetbeyond.org> wrote:
[...]
> >> src/gitlab.com/gitlab-org/gitlab/vendor/github.com/prometheus/client_golang/prometheus/desc.go:22:2:
> >>  cannot find package "github.com/cespare/xxhash/v2" in any of:
> >>
> >>
> >> /<<PKGBUILDDIR>>/_build/src/gitlab.com/gitlab-org/gitlab/vendor/github.com/cespare/xxhash/v2
> >>  (vendor tree)
> >>          /usr/lib/go-1.19/src/github.com/cespare/xxhash/v2 (from
> >> $GOROOT)
> >>          /<<PKGBUILDDIR>>/_build/src/github.com/cespare/xxhash/v2
> >> (from
> >>  $GOPATH
> >>
> >>  even though golang-github-cespare-xxhash-dev is installed.
> >>
> >>  I think the import path and binary package name should be bumped to
> >>  match go.mod:
> >>  module github.com/cespare/xxhash/v2
> >>
> >>  so binary package should be golang-github-cespare-xxhash-v2-dev.
> >> Though
> >>  I'm not 100% sure about the XS-Go-Import-Path as I think it should
> >>  match without a change there.
> >
> > No. The Go compiler can find it automatically. Please see the detail
> > at
> >
> > https://lists.debian.org/debian-go/2020/06/msg00009.html
> >
> > I think you may have done some non-standard magic in your package.
> >
>
> I just vendored some dependencies till protobuf 1.5 vs 1.3 settle down.
> So from a vendored module, it is not able to find this module.
>

I don't think this is cause.

For example, golang-k8s-klog is also a v2 module, and it doesn't have
v2 in XS-Go-Import-Path.
But packages which have vendor library which uses that v2 path, can be
built successfully.
For example,
https://sources.debian.org/src/containerd/1.6.9~ds1-1/vendor/k8s.io/client-go/rest/request.go/#L48

-- 
Shengjing Zhu



More information about the Pkg-go-maintainers mailing list