[oe-commits] Saul Wold : utils.bbclass: modify create_wrapper to correctly follow symlinks

git version control git at git.openembedded.org
Thu May 19 22:41:18 UTC 2011


Module: openembedded-core.git
Branch: master
Commit: a10bd976f4cef54ac50b0c82f885c17a26e5989f
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=a10bd976f4cef54ac50b0c82f885c17a26e5989f

Author: Saul Wold <sgw at linux.intel.com>
Date:   Tue May 17 21:43:42 2011 -0700

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 at linux.intel.com>

---

 meta/classes/utils.bbclass |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index 1965d2f..e103351 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -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
 }





More information about the Openembedded-commits mailing list