diff options
| author | Ondřej Surý <ondrej@sury.org> | 2011-05-23 10:29:00 +0200 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2011-05-23 11:04:17 +0200 |
| commit | d8c557afe50f77e66da20c670832b09861e1601d (patch) | |
| tree | ec6c608a7fcf0b713dd34320c7218bbcb0c34eeb | |
| parent | 26900d923de2d007c73c339e47344b6d4558afe5 (diff) | |
| download | golang-d8c557afe50f77e66da20c670832b09861e1601d.tar.gz | |
Import slightly modified patch to be more clear about $GOPATH installs for non-root users
| -rw-r--r-- | debian/patches/009-goinstall_can_install_to_GOPATH.patch | 17 | ||||
| -rw-r--r-- | debian/patches/010-dont_update_standard_packages.patch | 13 | ||||
| -rw-r--r-- | debian/patches/series | 2 |
3 files changed, 32 insertions, 0 deletions
diff --git a/debian/patches/009-goinstall_can_install_to_GOPATH.patch b/debian/patches/009-goinstall_can_install_to_GOPATH.patch new file mode 100644 index 000000000..e15458185 --- /dev/null +++ b/debian/patches/009-goinstall_can_install_to_GOPATH.patch @@ -0,0 +1,17 @@ +--- a/src/cmd/goinstall/main.go ++++ b/src/cmd/goinstall/main.go +@@ -61,6 +61,14 @@ func main() { + } + root += filepath.FromSlash("/src/pkg/") + ++ if os.Getuid() != 0 && os.Getenv("GOPATH") == "" { ++ fmt.Fprintf(os.Stderr, "%s: set $GOPATH to the directory you want packages installed to if you get permission denied error\n", argv0) ++ } ++ ++ if root != defaultRoot.path { ++ logfile = filepath.Join(defaultRoot.path, "goinstall.log") ++ } ++ + // special case - "unsafe" is already installed + visit["unsafe"] = done + diff --git a/debian/patches/010-dont_update_standard_packages.patch b/debian/patches/010-dont_update_standard_packages.patch new file mode 100644 index 000000000..94d6f3e28 --- /dev/null +++ b/debian/patches/010-dont_update_standard_packages.patch @@ -0,0 +1,13 @@ +--- a/src/cmd/goinstall/main.go ++++ b/src/cmd/goinstall/main.go +@@ -169,8 +169,8 @@ func install(pkg, parent string) { + dir = pkg + local = true + } else if isStandardPath(pkg) { +- dir = filepath.Join(root, filepath.FromSlash(pkg)) +- local = true ++ visit[pkg] = done ++ return + } else { + proot = findPkgroot(pkg) + err := download(pkg, proot.srcDir()) diff --git a/debian/patches/series b/debian/patches/series index 47b482f66..4b2b2d632 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -5,3 +5,5 @@ 006-fix_kfreebsd_build.patch 007-use_native_dynamic_linker_on_kfreebsd.patch 008-emacs-mode-key-literal-indent.patch +009-goinstall_can_install_to_GOPATH.patch +010-dont_update_standard_packages.patch |
