classes: add go112.bbclass to fix build with go 1.12
authorJackie Huang <jackie.huang@windriver.com>
Mon, 30 Sep 2019 06:55:08 +0000 (14:55 +0800)
committerJackie Huang <jackie.huang@windriver.com>
Thu, 10 Oct 2019 02:26:56 +0000 (10:26 +0800)
Fixed the issue:
| build cache is disabled by GOCACHE=off, but required as of Go 1.12

Issue-ID: INF-4
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: I6c87014428194382bb68d09119ddd670437d55c5

meta-oran/classes/go112.bbclass [new file with mode: 0644]
meta-oran/recipes-containers/containerd/containerd-opencontainers_git.bbappend
meta-oran/recipes-containers/docker-distribution/docker-distribution_git.bbappend
meta-oran/recipes-containers/docker/docker_%.bbappend
meta-oran/recipes-containers/kubernetes/kubernetes_1.15.2.bb
meta-oran/recipes-containers/runc/runc-docker_git.bbappend
meta-oran/recipes-networking/cni/cni_git.bbappend

diff --git a/meta-oran/classes/go112.bbclass b/meta-oran/classes/go112.bbclass
new file mode 100644 (file)
index 0000000..15fa53a
--- /dev/null
@@ -0,0 +1,7 @@
+#
+# Copyright (C) 2019 Wind River Systems, Inc.
+#
+
+do_compile_prepend() {
+    unset GOCACHE
+}
index b8c2351..a0790b8 100644 (file)
@@ -2,7 +2,4 @@
 # Copyright (C) 2019 Wind River Systems, Inc.
 #
 
-do_compile_prepend() {
-    unset GOCACHE
-}
-
+inherit ${@bb.utils.contains('GOVERSION', '1.2.%', 'go112', '', d)}
index 15fa53a..a0790b8 100644 (file)
@@ -2,6 +2,4 @@
 # Copyright (C) 2019 Wind River Systems, Inc.
 #
 
-do_compile_prepend() {
-    unset GOCACHE
-}
+inherit ${@bb.utils.contains('GOVERSION', '1.2.%', 'go112', '', d)}
index 78364e8..281e0ed 100644 (file)
@@ -1,8 +1,6 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
 
-do_compile_prepend() {
-    unset GOCACHE
-}
+inherit ${@bb.utils.contains('GOVERSION', '1.2.%', 'go112', '', d)}
 
 do_install_append() {
     sed -i '/ExecStart=/a ExecStartPost=/usr/sbin/iptables -P FORWARD ACCEPT' ${D}${systemd_unitdir}/system/docker.service
index cb3b01d..24e3537 100644 (file)
@@ -8,6 +8,4 @@ PV = "1.15.2+git${SRCREV_kubernetes}"
 SRCREV_kubernetes = "f6278300bebbb750328ac16ee6dd3aa7d3549568"
 SRC_BRANCH = "release-1.15"
 
-do_compile_prepend() {
-    unset GOCACHE
-}
+inherit ${@bb.utils.contains('GOVERSION', '1.2.%', 'go112', '', d)}
index 15fa53a..a0790b8 100644 (file)
@@ -2,6 +2,4 @@
 # Copyright (C) 2019 Wind River Systems, Inc.
 #
 
-do_compile_prepend() {
-    unset GOCACHE
-}
+inherit ${@bb.utils.contains('GOVERSION', '1.2.%', 'go112', '', d)}
index 5fe571e..5f3f912 100644 (file)
@@ -2,9 +2,7 @@
 # Copyright (C) 2019 Wind River Systems, Inc.
 #
 
-do_compile_prepend() {
-    unset GOCACHE
-}
+inherit ${@bb.utils.contains('GOVERSION', '1.2.%', 'go112', '', d)}
 
 do_compile_append() {
     # build ipam plugins