mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
scripts/oe-find-native-sysroot: use bitbake-getvar
Instead of bitbake and grep, just use bitbake-getvar. (From OE-Core rev: b5011a2fc248d88b5491cf6af1fc15e5974f6e45) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
0fce19ee9e
commit
056a8bbe1e
@@ -36,20 +36,9 @@ if [ "$1" = '--help' -o "$1" = '-h' -o $# -ne 1 ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Global vars
|
# Global vars
|
||||||
BITBAKE_E=""
|
|
||||||
set_oe_native_sysroot(){
|
set_oe_native_sysroot(){
|
||||||
echo "Running bitbake -e $1"
|
echo "Getting sysroot..."
|
||||||
BITBAKE_E="`bitbake -e $1`"
|
OECORE_NATIVE_SYSROOT=$(bitbake-getvar -r $1 --value STAGING_DIR_NATIVE)
|
||||||
OECORE_NATIVE_SYSROOT=`echo "$BITBAKE_E" | grep ^STAGING_DIR_NATIVE= | cut -d '"' -f2`
|
|
||||||
|
|
||||||
if [ "x$OECORE_NATIVE_SYSROOT" = "x" ]; then
|
|
||||||
# This indicates that there was an error running bitbake -e that
|
|
||||||
# the user needs to be informed of
|
|
||||||
echo "There was an error running bitbake to determine STAGING_DIR_NATIVE"
|
|
||||||
echo "Here is the output from bitbake -e $1"
|
|
||||||
echo $BITBAKE_E
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "x$OECORE_NATIVE_SYSROOT" = "x" ]; then
|
if [ "x$OECORE_NATIVE_SYSROOT" = "x" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user