From patchwork Wed May 18 22:26:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [11/30] utils.bbclass: modify create_wrapper to correctly follow symlinks Date: Wed, 18 May 2011 22:26:40 -0000 From: Saul Wold X-Patchwork-Id: 4439 Message-Id: <542b82da52bc72f47b44ef0cd1b12019d59de457.1305756950.git.sgw@linux.intel.com> To: openembedded-core@lists.openembedded.org This ensures you look up the symbolic link to get the full path Signed-off-by: Saul Wold --- 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 6bcaf86..1965d2f 100644 --- a/meta/classes/utils.bbclass +++ b/meta/classes/utils.bbclass @@ -312,7 +312,8 @@ create_wrapper () { cmdname=`basename $cmd`.real cat <$cmd #!/bin/sh -exec env $@ \`dirname \$0\`/$cmdname "\$@" +realpath=\`readlink -fn \$0\` +exec env $@ \`dirname \$realpath\`/$cmdname "\$@" END chmod +x $cmd }