summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-17 15:57:03 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-18 17:33:14 +0100
commit2631eff585ad62f74cd27b074844cb9514f08119 (patch)
tree3287e804f9908a2e21af5b7992d1c0ba4dcd17f8 /meta
parentf6f5eed533b535c363679dbf544e4d38064da089 (diff)
downloadpoky-2631eff585ad62f74cd27b074844cb9514f08119.tar.gz
utils.bbclass: Tweak create_wrapper
Currently the full path is specified to exec however this may incorporate a build path which in the nativesdk case, is not transformed to a target system path. This leads to failures due to incorrect paths. This patch ensures the full build path is not encoded into the wrapper script. (From OE-Core rev: 4569d7403638e4c1f637e3a6adb8dea620dc8543) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/utils.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index cf8893f5b4..e873c539c5 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -282,12 +282,12 @@ create_wrapper () {
282 echo "Generating wrapper script for $cmd" 282 echo "Generating wrapper script for $cmd"
283 283
284 mv $cmd $cmd.real 284 mv $cmd $cmd.real
285 cmdname=`basename $cmd`.real 285 cmdname=`basename $cmd`
286 cat <<END >$cmd 286 cat <<END >$cmd
287#!/bin/bash 287#!/bin/bash
288realpath=\`readlink -fn \$0\` 288realpath=\`readlink -fn \$0\`
289export $@ 289export $@
290exec -a $cmd \`dirname \$realpath\`/$cmdname "\$@" 290exec -a \`dirname \$realpath\`/$cmdname \`dirname \$realpath\`/$cmdname.real "\$@"
291END 291END
292 chmod +x $cmd 292 chmod +x $cmd
293} 293}