Skip to contentSkip to conversation

utils.bbclass: fix for create_wrapper

PATCH Applied Saul Wold 3 participants 4 messages May 18, 2011 – May 19, 2011

lore
Share & tools
lore

Saul Wold

author
#0 lore raw

cover utils.bbclass: fix for create_wrapper

From: Saul Wold <[email protected]>

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: sgw/patch
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=sgw/patch

Thanks,
Saul Wold <[email protected]>
---

Saul Wold (1):
utils.bbclass: modify create_wrapper to correctly follow symlinks

 meta/classes/utils.bbclass |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Signature · 1 line
1.7.3.4
author
#1 lore raw

PATCH 1/1 utils.bbclass: modify create_wrapper to correctly follow symlinks

From: Saul Wold <[email protected]>

This ensures you look up the symbolic link to get the full path

---
 meta/classes/utils.bbclass |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
meta/classes/utils.bbclass +2 -1
index 6bcaf86..1965d2f 100644
@@ -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
 }
Signature · 1 line
1.7.3.4
#2 lore raw

Re: [PATCH 1/1] utils.bbclass: modify create_wrapper to correctly follow symlinks

Quoted 5 lines · Saul Wold

From: Saul Wold<[email protected]>

This ensures you look up the symbolic link to get the full path

Verified - this patch fixes the current breakage in the Poky tree as well.

Thanks

Quoted 18 lines
---
  meta/classes/utils.bbclass |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)
meta/classes/utils.bbclass +2 -1
index 6bcaf86..1965d2f 100644
@@ -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
  }
Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------