diff --git a/go-install-dont-reinstall-stdlibs.patch b/go-install-dont-reinstall-stdlibs.patch new file mode 100644 index 0000000..1161b55 --- /dev/null +++ b/go-install-dont-reinstall-stdlibs.patch @@ -0,0 +1,19 @@ +diff --git a/src/cmd/go/pkg.go b/src/cmd/go/pkg.go +index 54d65f9..0138028 100644 +--- a/src/cmd/go/pkg.go ++++ b/src/cmd/go/pkg.go +@@ -476,6 +476,14 @@ func isStale(p *Package, topRoot map[string]bool) bool { + return true + } + ++ // openSUSE bnc#776058 ++ // Only root user can reinstall a std library from a dependancy, all other ++ // users should *never* have to do this. ++ if os.Getuid() != 0 && p.Standard { ++ fmt.Println("openSUSE") ++ return false ++ } ++ + olderThan := func(file string) bool { + fi, err := os.Stat(file) + return err != nil || fi.ModTime().After(built) diff --git a/go.changes b/go.changes index a3974cd..acf93bd 100644 --- a/go.changes +++ b/go.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Wed Sep 5 03:46:15 UTC 2012 - graham@andtech.eu + +- BNC#776058 +- Add new patch to prevent the go install tool trying to reinstall + std library packages that are dependencies of third party packages. +- Using touch on the precompiled archives introdoces additional + problems with the go install tool. Instead, we simply don't mark + std library files as stale when a third party package is evaluated + for installation. The behaviour remains unchanged for the root + user and while it is inadvisable to manually reinstall standard + libraries using the openSUSE packages, we do not disallow it. + ------------------------------------------------------------------- Thu Aug 16 11:15:13 UTC 2012 - graham@andtech.eu diff --git a/go.spec b/go.spec index 24a0740..99bda09 100644 --- a/go.spec +++ b/go.spec @@ -41,6 +41,8 @@ Patch4: allow-binary-only-packages.patch Patch5: verbose-build.patch # PATCH-FIX-OPENSUSE fix vim Godoc and Import helpers/autocomplete Patch6: opensuse-vim.patch +# PATCH-FIX-OPENSUSE BNC#776058 +Patch7: go-install-dont-reinstall-stdlibs.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build #BuildRequires: bison #BuildRequires: ed @@ -112,6 +114,7 @@ echo %{requiretest} %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 cp %{SOURCE4} . cp %{SOURCE5} . @@ -217,10 +220,6 @@ ln -s %{_datadir}/go/src/pkg/runtime/{cgocall,runtime}.h %{buildroot}%{_libdir}/ %if 0%{?suse_version} >= 1210 %service_add_post godoc.service %endif -find %{_libdir}/go/pkg -type f -exec touch {} + - -%post -n go-doc -find %{_libdir}/go/pkg -type f -exec touch {} + %preun %if 0%{?suse_version} >= 1210