summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Viguera <javier.viguera@digi.com>2015-02-17 12:48:14 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-11 14:41:38 (GMT)
commit6b8f7999c3e86d6e834af95ffe4c33d0d53db34a (patch)
tree3636d192b7a8c2f9801da75b8103533d55a311a6
parent827dc7f12cf0d9f446c713a4a5b07a87146b77ab (diff)
downloadpoky-6b8f7999c3e86d6e834af95ffe4c33d0d53db34a.tar.gz
utils.bbclass: fix create_cmdline_wrapper
Similar to commit 4569d74 for create_wrapper function, this commit fixes hardcoded absolute build paths in create_cmdline_wrapper. Otherwise we end up with incorrect paths in users of this function. For example the 'file' wrapper in current released toolchain: exec -a /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-arm/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-file/5.18-r0/image//opt/poky/1.7.1/sysroots/x86_64-pokysdk-linux/usr/bin/file `dirname $realpath`/file.real --magic-file /opt/poky/1.7.1/sysroots/x86_64-pokysdk-linux/usr/share/misc/magic.mgc "$@" (From OE-Core rev: 49ab89eb9f83388e99069a4b53bdc4cba22bb6f3) (From OE-Core rev: 8503dee5a42fc0dc6dc6c79ce316aba1c91da6d1) Signed-off-by: Javier Viguera <javier.viguera@digi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 0a533af..775506d 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -259,11 +259,11 @@ create_cmdline_wrapper () {
259 echo "Generating wrapper script for $cmd" 259 echo "Generating wrapper script for $cmd"
260 260
261 mv $cmd $cmd.real 261 mv $cmd $cmd.real
262 cmdname=`basename $cmd`.real 262 cmdname=`basename $cmd`
263 cat <<END >$cmd 263 cat <<END >$cmd
264#!/bin/bash 264#!/bin/bash
265realpath=\`readlink -fn \$0\` 265realpath=\`readlink -fn \$0\`
266exec -a $cmd \`dirname \$realpath\`/$cmdname $@ "\$@" 266exec -a \`dirname \$realpath\`/$cmdname \`dirname \$realpath\`/$cmdname.real $@ "\$@"
267END 267END
268 chmod +x $cmd 268 chmod +x $cmd
269} 269}