summaryrefslogtreecommitdiffabout
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@gmx.de>2011-05-28 04:47:53 (GMT)
committer Tom Rini <tom_rini@mentor.com>2011-06-01 01:22:52 (GMT)
commitd8d2e1730a4e941bfeb5075c7816543ab201f9e0 (patch)
tree5d75e42889a03c2b69f51da16b4239804503371c
parent07a373d50c9696d37e3542ae7e4a290c2916ba43 (diff)
downloadopenembedded-d8d2e1730a4e941bfeb5075c7816543ab201f9e0.zip
openembedded-d8d2e1730a4e941bfeb5075c7816543ab201f9e0.tar.gz
openembedded-d8d2e1730a4e941bfeb5075c7816543ab201f9e0.tar.bz2
utils.bbclass: modify create_wrapper to correctly follow symlinks
* taken from OE-Core [1] * thanks Khem for pointing out[2] * fixes build failure perl | env: ./perl5.10.1.real: No such file or directory | make[1]: *** [pod/perlapi.pod] Error 127 [1] http://git.openembedded.org/cgit.cgi/openembedded-core/commit/?id=a10bd976f4cef54ac50b0c82f885c17a26e5989f [2] http://lists.linuxtogo.org/pipermail/openembedded-core/2011-May/002975.html Signed-off-by: Andreas Mueller <schnitzeltony@gmx.de> Signed-off-by: Tom Rini <tom_rini@mentor.com>
-rw-r--r--classes/utils.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/classes/utils.bbclass b/classes/utils.bbclass
index 7591d47..936f7fd 100644
--- a/classes/utils.bbclass
+++ b/classes/utils.bbclass
@@ -407,7 +407,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
}