diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-06-17 15:57:03 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-06-18 17:33:14 +0100 |
commit | 2631eff585ad62f74cd27b074844cb9514f08119 (patch) | |
tree | 3287e804f9908a2e21af5b7992d1c0ba4dcd17f8 /meta | |
parent | f6f5eed533b535c363679dbf544e4d38064da089 (diff) | |
download | poky-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.bbclass | 4 |
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 |
288 | realpath=\`readlink -fn \$0\` | 288 | realpath=\`readlink -fn \$0\` |
289 | export $@ | 289 | export $@ |
290 | exec -a $cmd \`dirname \$realpath\`/$cmdname "\$@" | 290 | exec -a \`dirname \$realpath\`/$cmdname \`dirname \$realpath\`/$cmdname.real "\$@" |
291 | END | 291 | END |
292 | chmod +x $cmd | 292 | chmod +x $cmd |
293 | } | 293 | } |