diff options
Diffstat (limited to 'scripts/oe-find-native-sysroot')
-rwxr-xr-x | scripts/oe-find-native-sysroot | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/scripts/oe-find-native-sysroot b/scripts/oe-find-native-sysroot index cc146b3fdb..6228efcbee 100755 --- a/scripts/oe-find-native-sysroot +++ b/scripts/oe-find-native-sysroot @@ -17,18 +17,8 @@ # # Copyright (c) 2010 Linux Foundation # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. +# SPDX-License-Identifier: GPL-2.0-only # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. if [ "$1" = '--help' -o "$1" = '-h' -o $# -ne 1 ] ; then echo 'Usage: oe-find-native-sysroot <recipe> [-h|--help]' @@ -46,20 +36,9 @@ if [ "$1" = '--help' -o "$1" = '-h' -o $# -ne 1 ] ; then fi # Global vars -BITBAKE_E="" set_oe_native_sysroot(){ - echo "Running bitbake -e $1" - BITBAKE_E="`bitbake -e $1`" - 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 + echo "Getting sysroot..." + OECORE_NATIVE_SYSROOT=$(bitbake-getvar -r $1 --value STAGING_DIR_NATIVE) } if [ "x$OECORE_NATIVE_SYSROOT" = "x" ]; then |