summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorAchille Fouilleul <achille.fouilleul@gadz.org>2019-03-06 16:32:52 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-03-06 23:12:27 +0000
commit739c9a69cacc499cab0a4f98de16170b56983305 (patch)
treeeb04ee9969fc74150489237ea6e53147b384fe43 /meta/classes
parent648cd455dcdd67a66ed786ce43f31ba22442957b (diff)
downloadpoky-739c9a69cacc499cab0a4f98de16170b56983305.tar.gz
utils: Fix create_wrapper
Wrappers generated by create_wrapper do not work properly: python, for example, looks at argv[0] to know if it is running from a virtualenv. Because the wrapper replaces argv[0] with python's canonical path, python cannot tell whether it has been invoked directly or from a virtualenv symlink. This change makes the wrapper pass the original argv[0] down to the real command. (From OE-Core rev: 791e5bfcb449024f295a4f8f507c1012cff76f9d) Signed-off-by: Achille Fouilleul <achille.fouilleul@gadz.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/utils.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index 0016e5c4e6..cd3d05709e 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -264,7 +264,7 @@ create_wrapper () {
264realpath=\`readlink -fn \$0\` 264realpath=\`readlink -fn \$0\`
265realdir=\`dirname \$realpath\` 265realdir=\`dirname \$realpath\`
266export $exportstring 266export $exportstring
267exec -a \`dirname \$realpath\`/$cmdname \`dirname \$realpath\`/$cmdname.real "\$@" 267exec -a "\$0" \$realdir/$cmdname.real "\$@"
268END 268END
269 chmod +x $cmd 269 chmod +x $cmd
270} 270}