mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
oe-buildenv-internal: Add paths to $PATH individually
Instead of assuming that the path to the scripts directory always is in $PATH directly before the bitbake directory, treat them as separate paths and add them individually to $PATH. (From OE-Core rev: 5b9e91a3b1d4f56c8646d7d7937ab453cc9c40a0) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
dd5f2f7275
commit
39ac332f66
|
@ -95,9 +95,14 @@ if ! (test -d "$BITBAKEDIR"); then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Make sure our paths are at the beginning of $PATH
|
# Make sure our paths are at the beginning of $PATH
|
||||||
NEWPATHS="${OEROOT}/scripts:$BITBAKEDIR/bin:"
|
for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do
|
||||||
PATH=$NEWPATHS$(echo $PATH | sed -e "s|:$NEWPATHS|:|g" -e "s|^$NEWPATHS||")
|
# Remove any existences of $newpath from $PATH
|
||||||
unset BITBAKEDIR NEWPATHS
|
PATH=$(echo $PATH | sed -re "s#(^|:)$newpath(:|$)#\1#g;s#^:##")
|
||||||
|
|
||||||
|
# Add $newpath to $PATH
|
||||||
|
PATH="$newpath:$PATH"
|
||||||
|
done
|
||||||
|
unset BITBAKEDIR newpath
|
||||||
|
|
||||||
# Used by the runqemu script
|
# Used by the runqemu script
|
||||||
export BUILDDIR
|
export BUILDDIR
|
||||||
|
|
Loading…
Reference in New Issue
Block a user