commit:     ec2f6e3983c7257e73344d74cc0cda798c4bb289
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  3 18:35:00 2022 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sat Sep  3 18:37:27 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec2f6e39

go-module.eclass: add build flag to ignore version control information

This adds -buildvcs=false to the default build flags and bumps the
minimum version of go to 1.18.

Bug: https://bugs.gentoo.org/836261
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>

 eclass/go-module.eclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass
index a5dafb45cab8..681a5bca5561 100644
--- a/eclass/go-module.eclass
+++ b/eclass/go-module.eclass
@@ -68,7 +68,7 @@ if [[ -z ${_GO_MODULE} ]]; then
 _GO_MODULE=1
 
 if [[ ! ${GO_OPTIONAL} ]]; then
-       BDEPEND=">=dev-lang/go-1.16"
+       BDEPEND=">=dev-lang/go-1.18"
 
        # Workaround for pkgcheck false positive: 
https://github.com/pkgcore/pkgcheck/issues/214
        # MissingUnpackerDep: version ...: missing BDEPEND="app-arch/unzip"
@@ -93,10 +93,11 @@ export GOCACHE="${T}/go-build"
 export GOMODCACHE="${WORKDIR}/go-mod"
 
 # The following go flags should be used for all builds.
+# -buildvcs=false omits version control information
 # -modcacherw makes the build cache read/write
 # -v prints the names of packages as they are compiled
 # -x prints commands as they are executed
-export GOFLAGS="-modcacherw -v -x"
+export GOFLAGS="-buildvcs=false -modcacherw -v -x"
 
 # Do not complain about CFLAGS etc since go projects do not use them.
 QA_FLAGS_IGNORED='.*'

Reply via email to