diff options
author | Achille Fouilleul <achille.fouilleul@gadz.org> | 2019-03-06 16:32:52 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-03-06 23:12:27 +0000 |
commit | 739c9a69cacc499cab0a4f98de16170b56983305 (patch) | |
tree | eb04ee9969fc74150489237ea6e53147b384fe43 /meta/classes | |
parent | 648cd455dcdd67a66ed786ce43f31ba22442957b (diff) | |
download | poky-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.bbclass | 2 |
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 () { | |||
264 | realpath=\`readlink -fn \$0\` | 264 | realpath=\`readlink -fn \$0\` |
265 | realdir=\`dirname \$realpath\` | 265 | realdir=\`dirname \$realpath\` |
266 | export $exportstring | 266 | export $exportstring |
267 | exec -a \`dirname \$realpath\`/$cmdname \`dirname \$realpath\`/$cmdname.real "\$@" | 267 | exec -a "\$0" \$realdir/$cmdname.real "\$@" |
268 | END | 268 | END |
269 | chmod +x $cmd | 269 | chmod +x $cmd |
270 | } | 270 | } |