summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorJavier Viguera <javier.viguera@digi.com>2015-02-17 13:48:14 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-17 22:29:04 +0000
commit49ab89eb9f83388e99069a4b53bdc4cba22bb6f3 (patch)
tree253fd975b20498944874b297b244c3e9b59698d8 /meta
parentd4fe8f639d87d5ff35e50d07d41d0c1e9f12c4e3 (diff)
downloadopenembedded-core-49ab89eb9f83388e99069a4b53bdc4cba22bb6f3.tar.gz
openembedded-core-49ab89eb9f83388e99069a4b53bdc4cba22bb6f3.tar.bz2
openembedded-core-49ab89eb9f83388e99069a4b53bdc4cba22bb6f3.zip
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 "$@" Signed-off-by: Javier Viguera <javier.viguera@digi.com> 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 0f2a484091..80e90e8777 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -259,11 +259,11 @@ create_cmdline_wrapper () {
echo "Generating wrapper script for $cmd"
mv $cmd $cmd.real
- cmdname=`basename $cmd`.real
+ cmdname=`basename $cmd`
cat <<END >$cmd
#!/bin/bash
realpath=\`readlink -fn \$0\`
-exec -a $cmd \`dirname \$realpath\`/$cmdname $@ "\$@"
+exec -a \`dirname \$realpath\`/$cmdname \`dirname \$realpath\`/$cmdname.real $@ "\$@"
END
chmod +x $cmd
}