Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select non-transitional build dep when Go-Import-Path has two or more corresponding -dev packages #99

Open
zhsj opened this issue Jun 24, 2018 · 5 comments
Assignees
Milestone

Comments

@zhsj
Copy link
Member

zhsj commented Jun 24, 2018

For example,

$ dh-make-golang search golang.org/x/text
golang-x-text-dev: golang.org/x/text

It should be golang-golang-x-text-dev instead.

Go through the meta source, following import paths have two or more -dev packages,

github.com/spf13/cobra ['golang-github-dnephin-cobra-dev', 'golang-github-spf13-cobra-dev']
github.com/docker/containerd ['golang-github-containerd-docker-containerd-dev', 'golang-github-docker-containerd-dev']
github.com/docker/docker ['golang-docker-dev', 'golang-github-docker-docker-dev']
github.com/opencontainers/runc ['golang-github-opencontainers-docker-runc-dev', 'golang-github-opencontainers-runc-dev']
github.com/gogo/protobuf ['golang-github-gogo-protobuf-dev', 'golang-gogoprotobuf-dev']
gopkg.in/check.v1 ['golang-check.v1-dev', 'golang-gopkg-check.v1-dev']
gopkg.in/check.v1,
                   launchpad.net/gocheck,
                   github.com/go-check/check ['golang-check.v1-dev', 'golang-gopkg-check.v1-dev']
github.com/jonboulle/clockwork ['golang-clockwork-dev', 'golang-github-jonboulle-clockwork-dev']
github.com/codegangsta/cli ['golang-codegangsta-cli-dev', 'golang-github-codegangsta-cli-dev']
github.com/gorilla/context ['golang-context-dev', 'golang-github-gorilla-context-dev']
github.com/miekg/dns ['golang-dns-dev', 'golang-github-miekg-dns-dev']
github.com/coreos/go-etcd ['golang-etcd-dev', 'golang-github-coreos-go-etcd-dev']
github.com/fsnotify/fsnotify ['golang-fsnotify-dev', 'golang-github-fsnotify-fsnotify-dev', 'golang-github-go-fsnotify-fsnotify-dev']
github.com/BurntSushi/toml ['golang-github-burntsushi-toml-dev', 'golang-toml-dev']
github.com/coreos/go-semver ['golang-github-coreos-go-semver-dev', 'golang-go-semver-dev']
github.com/docker/go ['golang-github-docker-go-dev', 'golang-github-jfrazelle-go-dev']
github.com/golang/snappy ['golang-github-golang-snappy-dev', 'golang-snappy-go-dev']
github.com/gorilla/websocket ['golang-github-gorilla-websocket-dev', 'golang-websocket-dev']
github.com/gucumber/gucumber ['golang-github-gucumber-gucumber-dev', 'golang-github-lsegal-gucumber-dev']
github.com/influxdata/influxdb ['golang-github-influxdb-influxdb-dev', 'influxdb-dev']
github.com/kardianos/osext ['golang-github-kardianos-osext-dev', 'golang-github-kardianos-osext-dev']
github.com/kr/pretty ['golang-github-kr-pretty-dev', 'golang-pretty-dev']
github.com/kr/pty ['golang-github-kr-pty-dev', 'golang-pty-dev']
github.com/kr/text ['golang-github-kr-text-dev', 'golang-text-dev']
github.com/lib/pq ['golang-github-lib-pq-dev', 'golang-pq-dev']
github.com/mreiferson/go-httpclient ['golang-github-mreiferson-go-httpclient-dev', 'golang-mreiferson-httpclient-dev']
github.com/pborman/uuid ['golang-github-pborman-uuid-dev', 'golang-uuid-dev']
github.com/prometheus/client_golang ['golang-github-prometheus-client-golang-dev', 'golang-prometheus-client-dev']
github.com/rcrowley/go-metrics ['golang-github-rcrowley-go-metrics-dev', 'golang-metrics-dev']
github.com/Sirupsen/logrus ['golang-github-sirupsen-logrus-dev', 'golang-logrus-dev']
github.com/sirupsen/logrus ['golang-github-sirupsen-logrus-dev', 'golang-logrus-dev']
github.com/snapcore/snapd ['golang-github-snapcore-snapd-dev', 'golang-github-ubuntu-core-snappy-dev']
github.com/stretchr/objx ['golang-github-stretchr-objx-dev', 'golang-objx-dev']
github.com/syndtr/goleveldb ['golang-github-syndtr-goleveldb-dev', 'golang-goleveldb-dev']
github.com/tchap/go-patricia ['golang-github-tchap-go-patricia-dev', 'golang-go-patricia-dev']
github.com/xi2/xz, xi2.org/x/xz ['golang-github-xi2-xz-dev', 'golang-xi2-x-xz-dev']
golang.org/x/crypto ['golang-go.crypto-dev', 'golang-golang-x-crypto-dev']
golang.org/x/net ['golang-go.net-dev', 'golang-golang-x-net-dev']
golang.org/x/tools ['golang-go.tools-dev', 'golang-golang-x-tools-dev']
golang.org/x/oauth2 ['golang-golang-x-oauth2-dev', 'golang-golang-x-oauth2-google-dev']
golang.org/x/text ['golang-golang-x-text-dev', 'golang-x-text-dev']
cloud.google.com/go ['golang-google-cloud-compute-metadata-dev', 'golang-google-cloud-dev']
gopkg.in/alecthomas/kingpin.v3,
                   gopkg.in/alecthomas/kingpin.v3-unstable,
                   github.com/alecthomas/kingpin, ['golang-gopkg-alecthomas-kingpin.v3-dev', 'golang-gopkg-alecthomas-kingpin.v3-unstable-dev']
gopkg.in/yaml.v2 ['golang-gopkg-yaml.v2-dev', 'golang-yaml.v2-dev']

Most are caused by transitional package, but golang.org/x/oauth2 is caused by package splits.

$ dh-make-golang search golang.org/x/oauth2
golang-golang-x-oauth2-google-dev: golang.org/x/oauth

It should be golang-golang-x-oauth2-dev.

@zhsj
Copy link
Member Author

zhsj commented Jun 24, 2018

This seems hard to resolve, since we set Go-Import-Path on source packages. And it can't be set on binary packages.

@stapelberg
Copy link
Collaborator

Would it be an improvement to select all matching packages instead of just the first one? That way, we’ll have a little bit of overhead for transitional packages, but the build at least succeeds.

@zhsj
Copy link
Member Author

zhsj commented Jun 24, 2018

The build doesn't fail if transitional package has been selected. Actually nothing breaks. Even golang-golang-x-oauth2-google-dev is selected, golang-golang-x-oauth2-dev will be selected by depends.

I think it's only "nice" level to have this issue been fixed.

@stapelberg stapelberg changed the title Failed to select the correct one when Go-Import-Path has two or more corresponding -dev packages select non-transitional build dep when Go-Import-Path has two or more corresponding -dev packages Jun 24, 2018
@stapelberg
Copy link
Collaborator

Thanks, updated the title to reflect that.

@CyrilBrulebois
Copy link

Not knowing about issues being tracked here, I've rediscovered this issue on my own, and brainstormed possible ideas on the debian-go mailing list:

Adding pointers here in case somebody wanted to pick those up (or shoot them down). :)

@anthonyfok anthonyfok self-assigned this Mar 21, 2024
@anthonyfok anthonyfok added this to the v0.8.0 milestone Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants