summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2011-05-17 21:43:42 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-19 15:15:42 +0100
commit9215d23fd26c62d250749b8084a52f383cb16fba (patch)
tree8d7ebfb5ebaf6e29f5272fdbb80a64f05304ba8e /meta/classes
parent1eb0207a7ae8cbc31ecde313a020ed4f12f70dd8 (diff)
downloadopenembedded-core-9215d23fd26c62d250749b8084a52f383cb16fba.tar.gz
openembedded-core-9215d23fd26c62d250749b8084a52f383cb16fba.tar.bz2
openembedded-core-9215d23fd26c62d250749b8084a52f383cb16fba.tar.xz
openembedded-core-9215d23fd26c62d250749b8084a52f383cb16fba.zip
utils.bbclass: modify create_wrapper to correctly follow symlinks
This ensures you look up the symbolic link to get the full path Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/utils.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index 6bcaf86b0..1965d2f1b 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -312,7 +312,8 @@ create_wrapper () {
cmdname=`basename $cmd`.real
cat <<END >$cmd
#!/bin/sh
-exec env $@ \`dirname \$0\`/$cmdname "\$@"
+realpath=\`readlink -fn \$0\`
+exec env $@ \`dirname \$realpath\`/$cmdname "\$@"
END
chmod +x $cmd
}