]> code.ossystems Code Review - openembedded-core.git/commitdiff
utils.bbclass: modify create_wrapper to correctly follow symlinks
authorSaul Wold <sgw@linux.intel.com>
Wed, 18 May 2011 04:43:42 +0000 (21:43 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 19 May 2011 22:33:55 +0000 (23:33 +0100)
This ensures you look up the symbolic link to get the full path

Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/classes/utils.bbclass

index 1965d2f1b47f4365314592cef5824a57cbf00599..e103351e343668d3d2689afa81d46800c919971f 100644 (file)
@@ -289,7 +289,8 @@ create_cmdline_wrapper () {
    cmdname=`basename $cmd`.real
    cat <<END >$cmd
 #!/bin/sh
-exec \`dirname \$0\`/$cmdname "\$@"
+realpath=\`readlink -fn \$0\`
+exec \`dirname \$realpath\`/$cmdname "\$@"
 END
    chmod +x $cmd
 }