Closed nim-nim closed 6 years ago
The golist is built on top of go list
actually so it needs GOPATH to be set properly.
E.g. golang-github-go-ini-ini
currently provides 3 import path prefixes:
In the %install
section I call:
%goinstall
%goinstall -i gopkg.in/v1/ini
%goinstall -i gopkg.in/ini.v1
Each time the %goinstall
is invoked, it needs to create different GOPATH so all the resources are installed to correct locations. In the first case it defaults to %{gobaseipath}, so it creates $PWD/_build/src/github.com/go-ini/ini
. The second time $PWD/_build/src/gopkg.in/v1/ini
. And so on.
Given the %gobuildroot
is called in %build
section which is invoked before the %install
, it does not matter the symlink changes. Or is there something I don't see?
right now goinstall.sh goes out of its way to create a $PWD/_build directory and golist uses it as GOPATH
However:
→ golist should use GO_BUILD_PATH as source of installation files in --to-install mode, to be consistent with the rest and avoid duplicated code