All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saul Wold <sgw@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 1/1] utils.bbclass: modify create_wrapper to correctly follow symlinks
Date: Wed, 18 May 2011 11:57:41 -0700	[thread overview]
Message-ID: <acb069f6d1606913110f0829a4d8f738395d3baa.1305745000.git.sgw@linux.intel.com> (raw)
In-Reply-To: <cover.1305745000.git.sgw@linux.intel.com>

From: Saul Wold <sgw@linux.intel.com>

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 |    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 <<END >$cmd
 #!/bin/sh
-exec env $@ \`dirname \$0\`/$cmdname "\$@"
+realpath=\`readlink -fn \$0\`
+exec env $@ \`dirname \$realpath\`/$cmdname "\$@"
 END
    chmod +x $cmd
 }
-- 
1.7.3.4




  reply	other threads:[~2011-05-18 19:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-18 18:57 [PATCH 0/1] utils.bbclass: fix for create_wrapper Saul Wold
2011-05-18 18:57 ` Saul Wold [this message]
2011-05-19 11:57   ` [PATCH 1/1] utils.bbclass: modify create_wrapper to correctly follow symlinks Gary Thomas
2011-05-19 14:18 ` [PATCH 0/1] utils.bbclass: fix for create_wrapper Richard Purdie
  -- strict thread matches above, loose matches on Subject: below --
2011-05-18 18:23 [PATCH 0/1] [RFC] utils.bbclass: fix problem with perl and wrapper Saul Wold
2011-05-18 18:23 ` [PATCH 1/1] utils.bbclass: modify create_wrapper to correctly follow symlinks Saul Wold
2011-05-18 18:43   ` Koen Kooi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=acb069f6d1606913110f0829a4d8f738395d3baa.1305745000.git.sgw@linux.intel.com \
    --to=sgw@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.