diff options
author | Matt Madison <matt@madison.systems> | 2018-03-04 13:09:27 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-06 06:43:10 -0800 |
commit | 29af62dfa0b77125d95adc1f2468eb9bc6a5ca7c (patch) | |
tree | 0bfbc0d7d7d7b8bfe089ea9aa0f4e3e573d3dd69 /meta | |
parent | dc2e108efe79e24acd47724af1ef9e672f8b4400 (diff) | |
download | poky-29af62dfa0b77125d95adc1f2468eb9bc6a5ca7c.tar.gz |
go.bbclass: rename GO_TMPDIR -> GOTMPDIR
and export it. Go 1.10 now supports using this
separate variable locating its temporary files.
TMPDIR is still set, for compatibility with go1.9;
that can be dropped once 1.9 is retired.
(From OE-Core rev: ce9d70ae2f9981bf5b42641922c34c1ed54eeca3)
Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/go.bbclass | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass index a01b28bccd..96302a187c 100644 --- a/meta/classes/go.bbclass +++ b/meta/classes/go.bbclass | |||
@@ -49,8 +49,8 @@ GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/" | |||
49 | B = "${WORKDIR}/build" | 49 | B = "${WORKDIR}/build" |
50 | export GOPATH = "${B}" | 50 | export GOPATH = "${B}" |
51 | export GOCACHE = "off" | 51 | export GOCACHE = "off" |
52 | GO_TMPDIR ?= "${WORKDIR}/go-tmp" | 52 | export GOTMPDIR ?= "${WORKDIR}/go-tmp" |
53 | GO_TMPDIR[vardepvalue] = "" | 53 | GOTMPDIR[vardepvalue] = "" |
54 | 54 | ||
55 | python go_do_unpack() { | 55 | python go_do_unpack() { |
56 | src_uri = (d.getVar('SRC_URI') or "").split() | 56 | src_uri = (d.getVar('SRC_URI') or "").split() |
@@ -85,9 +85,10 @@ go_list_package_tests() { | |||
85 | go_do_configure() { | 85 | go_do_configure() { |
86 | ln -snf ${S}/src ${B}/ | 86 | ln -snf ${S}/src ${B}/ |
87 | } | 87 | } |
88 | do_configure[dirs] =+ "${GOTMPDIR}" | ||
88 | 89 | ||
89 | go_do_compile() { | 90 | go_do_compile() { |
90 | export TMPDIR="${GO_TMPDIR}" | 91 | export TMPDIR="${GOTMPDIR}" |
91 | ${GO} env | 92 | ${GO} env |
92 | if [ -n "${GO_INSTALL}" ]; then | 93 | if [ -n "${GO_INSTALL}" ]; then |
93 | if [ -n "${GO_LINKSHARED}" ]; then | 94 | if [ -n "${GO_LINKSHARED}" ]; then |
@@ -97,11 +98,11 @@ go_do_compile() { | |||
97 | ${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} `go_list_packages` | 98 | ${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} `go_list_packages` |
98 | fi | 99 | fi |
99 | } | 100 | } |
100 | do_compile[dirs] =+ "${GO_TMPDIR}" | 101 | do_compile[dirs] =+ "${GOTMPDIR}" |
101 | do_compile[cleandirs] = "${B}/bin ${B}/pkg" | 102 | do_compile[cleandirs] = "${B}/bin ${B}/pkg" |
102 | 103 | ||
103 | do_compile_ptest() { | 104 | do_compile_ptest() { |
104 | export TMPDIR="${GO_TMPDIR}" | 105 | export TMPDIR="${GOTMPDIR}" |
105 | rm -f ${B}/.go_compiled_tests.list | 106 | rm -f ${B}/.go_compiled_tests.list |
106 | go_list_package_tests | while read pkg; do | 107 | go_list_package_tests | while read pkg; do |
107 | cd ${B}/src/$pkg | 108 | cd ${B}/src/$pkg |
@@ -110,7 +111,7 @@ do_compile_ptest() { | |||
110 | sed -e's,/\./,/,'>> ${B}/.go_compiled_tests.list | 111 | sed -e's,/\./,/,'>> ${B}/.go_compiled_tests.list |
111 | done | 112 | done |
112 | } | 113 | } |
113 | do_compile_ptest_base[dirs] =+ "${GO_TMPDIR}" | 114 | do_compile_ptest_base[dirs] =+ "${GOTMPDIR}" |
114 | 115 | ||
115 | go_do_install() { | 116 | go_do_install() { |
116 | install -d ${D}${libdir}/go/src/${GO_IMPORT} | 117 | install -d ${D}${libdir}/go/src/${GO_IMPORT} |