https://bugzilla.redhat.com/show_bug.cgi?id=1426790
Bug ID: 1426790
Summary: Explain how to use the packaged files in Fedora, maybe
in a README.Fedora file
Product: Fedora
Version: rawhide
Component: golang
Assignee: vbatts(a)redhat.com
Reporter: opensource(a)till.name
QA Contact: extras-qa(a)fedoraproject.org
CC: admiller(a)redhat.com, amurdaca(a)redhat.com,
golang-updates(a)lists.fedoraproject.org,
jcajka(a)redhat.com, lemenkov(a)gmail.com,
renich(a)woralelandia.com, s(a)shk.io, vbatts(a)redhat.com
Description of problem:
I installed golang and golang-github-kr-pty-devel from Fedora as described in
https://developer.fedoraproject.org/tech/languages/go/go-installation.html
https://developer.fedoraproject.org/tech/languages/go/go-packages.html
but go does not use golang-github-kr-pty-devel without /usr/share/gocode being
added to $GOPATH. But if it is there, go complains that it cannot mkdir/write
to /usr/share/gocode/pkg.
$ export GOPATH=/usr/share/gocode:/home/till/work
$ go install till/test/pty
go install
github.com/kr/pty: mkdir /usr/share/gocode/pkg: permission denied
$ export GOPATH=/home/till/work:/usr/share/gocode
$ go install till/test/pty
go install
github.com/kr/pty: mkdir /usr/share/gocode/pkg: permission denied
Version-Release number of selected component (if applicable):
golang-1.6.4-3.fc24
How reproducible:
always
Steps to Reproduce:
1. dnf install golang-github-kr-pty-devel golang
2. mkdir -p $HOME/work/src/till/test/pty
export GOPATH=$HOME/work
cat > $HOME/work/src/till/test/pty <<EOF
package main
import (
"github.com/kr/pty"
"io"
"os"
"os/exec"
)
func main() {
c := exec.Command("grep", "--color=auto", "bar")
f, err := pty.Start(c)
if err != nil {
panic(err)
}
go func() {
f.Write([]byte("foo\n"))
f.Write([]byte("bar\n"))
f.Write([]byte("baz\n"))
f.Write([]byte{4}) // EOT
}()
io.Copy(os.Stdout, f)
}
EOF
3. go install till/test/pty
Actual results:
src/till/test/pty/pty.go:4:5: cannot find package "github.com/kr/pty" in any
of:
/usr/lib/golang/src/github.com/kr/pty (from $GOROOT)
/home/till/work/src/github.com/kr/pty (from $GOPATH)
Expected results:
It should install pty to $HOME/work/bin
Additional info:
It works when I do:
mkdir -p $HOME/system-golang
ln -s /usr/share/gocode/src/ $HOME/system-golang/src
export GOPATH=$GOPATH:$HOME/system-golang
If this is the recommended way of using Fedora go packages it should be
documented.
--
You are receiving this mail because:
You are on the CC list for the bug.