FS#35278 - [go] touch installed files to make "go install ..." work
Attached to Project:
Community Packages
Opened by daaku (daaku) - Tuesday, 14 May 2013, 17:02 GMT
Last edited by Alexander F. Rødseth (xyproto) - Sunday, 02 June 2013, 18:21 GMT
Opened by daaku (daaku) - Tuesday, 14 May 2013, 17:02 GMT
Last edited by Alexander F. Rødseth (xyproto) - Sunday, 02 June 2013, 18:21 GMT
|
Details
Description:
It's common to use "go install ..." which tries to compile/install everything where the source files have a more recent timestamp than the installed binaries or pkg files. It would be great if the install script touched the binaries or something to ensure a more recent timestamp on them. I think something like this would suffice: find /usr/lib/go/pkg -type f | xargs touch touch /usr/lib/go/bin/{godoc,go,gofmt} Additional info: * package version(s) * config and/or log files etc. Steps to reproduce: go install ... |
This task depends upon
Closed by Alexander F. Rødseth (xyproto)
Sunday, 02 June 2013, 18:21 GMT
Reason for closing: Fixed
Additional comments about closing: Please reopen if this should still be an issue. Thank you.
Sunday, 02 June 2013, 18:21 GMT
Reason for closing: Fixed
Additional comments about closing: Please reopen if this should still be an issue. Thank you.
go install runtime: open /usr/lib/go/pkg/linux_amd64/runtime.a: permission denied
There's a similar thread on the Debian bug tracker: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=658421
I did a similar fix by touching all the files (find /usr/lib/go/pkg -type f -exec touch {} +), and that resolved the errors.
find "$pkgdir/usr/lib/go/pkg" "$pkgdir/usr/bin" -type f -exec touch '{}' +
Should do the trick. You could be more specific, but I think just touching all binaries will reduce future breakage if new binaries are introduced as part of the go package.
To test if this is successful you can run this on a fresh install:
go install -v ...
And it should work and not try to rebuild standard go binaries/libraries provided by this package.
Thanks for reporting. Just to be 100% sure that everything is working correctly this time, do you have a command I can run when testing the updated package, to make sure it's working?
I did run "go install" in a directory with some go code before updating the package and could not find any problems at the time. (What would be a good test for '...' for "go install -v"?)
Thanks