mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 05:09:24 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
648cd455dc
commit
739c9a69ca
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user