[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to use /usr/share/gocode?



Hi

On Wed, Mar 20, 2019 at 11:48 AM Norbert Preining <norbert@preining.info> wrote:
>
> Dear all
>
> (please Cc answers)
>
> I am trying to fix some bugs in a Go program I am using which is not
> packaged. I have the sources in
>         ~/go/src/github.com/...
> I have installed the necessary dependencies via apt (all kinds of
> golang-github-... packages).
>
> Now I am trying to build the package. First I tried with
>         GOPATH=~/go
> which normally works if I have all deps installed into ~/go. But since
> other deps are in /usr/share/gocode, this doesn't work.
>
> Next I set
>         GOPATH=/usr/share/gocode:~/go
> which again fails with errors for *each* installed package:
>         mkdir /usr/share/gocode/pkg: permission denied
> (yes of course, I am not compiling anything as root!).
>
> Then I checked whether there is any documentation in the golang-go,
> golang, etc etc etc, but no README.Debian nor anything else under
>         /usr/share/doc/golang*
>
> Could you please explain (and maybe add it to some README.Debian in
> golang-go or similar) how
>         /usr/share/gocode
> should be used (besides copying everything into ~/go, which defeats the
> idea!).

You should not use /usr/share/gocode.

It's said on https://go-team.pages.debian.net/packaging.html that,

Libraries written in Go are packaged for Debian with the only purpose
of building other Go programs for Debian. They are specifically not
available for users in their regular development workflow. For that,
users should use go get. The rationale behind this decision is:
balabala

I'm not aware that other place has this note too.

-- 
Shengjing Zhu


Reply to: