From 791e5bfcb449024f295a4f8f507c1012cff76f9d Mon Sep 17 00:00:00 2001 From: Achille Fouilleul Date: Wed, 6 Mar 2019 16:32:52 +0100 Subject: 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. Signed-off-by: Achille Fouilleul Signed-off-by: Richard Purdie --- meta/classes/utils.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 () { realpath=\`readlink -fn \$0\` realdir=\`dirname \$realpath\` export $exportstring -exec -a \`dirname \$realpath\`/$cmdname \`dirname \$realpath\`/$cmdname.real "\$@" +exec -a "\$0" \$realdir/$cmdname.real "\$@" END chmod +x $cmd } -- cgit 1.2.3-korg