[PATCH] go-module.eclass: set a reasonable default for the go build cache

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] go-module.eclass: set a reasonable default for the go build cache

William Hubbs
Signed-off-by: William Hubbs <[hidden email]>
---
 eclass/go-module.eclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass
index 9c11959fdf8..89b32ed1201 100644
--- a/eclass/go-module.eclass
+++ b/eclass/go-module.eclass
@@ -59,6 +59,10 @@ BDEPEND=">=dev-lang/go-1.12"
 # this will become the default in the future.
 export GO111MODULE=on
 
+# Set the default for the go build cache
+# See "go help environment" for information on this setting
+export GOCACHE="${T}/go-build"
+
 # The following go flags should be used for all builds.
 # -mod=vendor stopps downloading of dependencies from the internet.
 # -v prints the names of packages as they are compiled
--
2.24.1


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] go-module.eclass: set a reasonable default for the go build cache

William Hubbs
On Sat, Jan 04, 2020 at 08:13:36PM -0600, William Hubbs wrote:

> Signed-off-by: William Hubbs <[hidden email]>
> ---
>  eclass/go-module.eclass | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass
> index 9c11959fdf8..89b32ed1201 100644
> --- a/eclass/go-module.eclass
> +++ b/eclass/go-module.eclass
> @@ -59,6 +59,10 @@ BDEPEND=">=dev-lang/go-1.12"
>  # this will become the default in the future.
>  export GO111MODULE=on
>  
> +# Set the default for the go build cache
> +# See "go help environment" for information on this setting
> +export GOCACHE="${T}/go-build"
> +
>  # The following go flags should be used for all builds.
>  # -mod=vendor stopps downloading of dependencies from the internet.
>  # -v prints the names of packages as they are compiled
> --
> 2.24.1
This is committed.

Thanks,

William


signature.asc (201 bytes) Download Attachment