]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
go-native: Install bootstrap binaries with 1.4 suffix
authorKhem Raj <raj.khem@gmail.com>
Mon, 20 Mar 2017 16:47:35 +0000 (09:47 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 21 Mar 2017 22:43:04 +0000 (22:43 +0000)
Currently, bin/go and bin/gofmt collide between go-native
and go-bootstrap-native packages, these are scripts anyway
which call the go compiler proper from right install, in
this case create go1.4 and gofmt1.4 names for these scripts
to avoid namespace collision

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-devtools/go/go-native.inc

index c1ada5121a8a2edd8bb4ace9d279e3a9946219f6..c21f8fda78382d38bcf0ab018c2d16dbfeeb069a 100644 (file)
@@ -22,14 +22,14 @@ do_compile() {
 }
 
 make_wrapper() {
-       rm -f ${D}${bindir}/$2
-       cat <<END >${D}${bindir}/$2
+       rm -f ${D}${bindir}/$2$3
+       cat <<END >${D}${bindir}/$2$3
 #!/bin/bash
 here=\`dirname \$0\`
-export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go\`}"
-\$here/../lib/go/bin/$1 "\$@"
+export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go$3\`}"
+\$here/../lib/go$3/bin/$1 "\$@"
 END
-       chmod +x ${D}${bindir}/$2
+       chmod +x ${D}${bindir}/$2$3
 }
 
 do_install() {
@@ -45,7 +45,7 @@ do_install() {
        do
                base=`basename $f`
                install -m755 $f ${D}${libdir}/go${BOOTSTRAP}/bin
-               make_wrapper $base $base
+               make_wrapper $base $base ${BOOTSTRAP}
        done
 }