moovweb/gvm — pull request #18 by COLDTURNIP (2013-02-10 18:50:40+00:00)
Title: Store packageset data under local path.

Hi Josh,

I'm trying to make packageset more portalbe so that we can place our codebase everwhere. To my case, I have to manage at least two Go repository under different folders: one for job, and my own pet-projects. I love gvm, it it more powerful than Go's build-in import system, but I notice that I still have to change `$GOPATH` by my hands so that I could execute `go build ` under my repository.

In this patch, I add a new option while managing packagesets. While replacing pakcageset name with `--local`, the packageset information will be managed under `some/local/repo/.gvm_local` folder, and add the root path of repository as the first path in `GOPATH` and `PATH`. This makes the repository more portable since we don't store all the
go-installed package files under `$HOME/.gvm` .

The repository root path for gvm is definded as `$PWD` while `pkgset create --local`. When `pkgset list` under some configured local repository, it will list the root path as the first packageset, and marked with `L`.

Currently it store all the files under `.gvm_local`. Though we can easily share our packageset to another computer, it's a little disturbing to copy all the binary results. Maybe we could only export/import package list, just like what virtualenv (for Pythong) does.