gb-build-dir.patch 713 B

1234567891011121314151617181920212223242526272829303132
  1. From a7b198e3a32509197150d7c2767262a7319ff339 Mon Sep 17 00:00:00 2001
  2. From: Georg Koppen <gk@torproject.org>
  3. Date: Tue, 6 Dec 2016 21:34:16 +0000
  4. Subject: [PATCH] Make the gb build directory deterministic
  5. diff --git a/context.go b/context.go
  6. index 53c00da..d040082 100644
  7. --- a/context.go
  8. +++ b/context.go
  9. @@ -3,7 +3,6 @@ package gb
  10. import (
  11. "fmt"
  12. "io"
  13. - "io/ioutil"
  14. "os"
  15. "os/exec"
  16. "path/filepath"
  17. @@ -136,7 +135,8 @@ func NewContext(p Project, opts ...func(*Context) error) (*Context, error) {
  18. },
  19. GcToolchain(),
  20. }
  21. - workdir, err := ioutil.TempDir("", "gb")
  22. + workdir := filepath.Join(os.TempDir(), "gb")
  23. + err := os.Mkdir(workdir, 0777)
  24. if err != nil {
  25. return nil, err
  26. }
  27. --
  28. 2.10.2