Patchwork oe-find-native-sysroot: minor optimization

login
register
mail settings
Submitter Joe MacDonald
Date Aug. 1, 2013, 2:29 p.m.
Message ID <1375367359-17205-1-git-send-email-joe@deserted.net>
Download mbox | patch
Permalink /patch/54911/
State Accepted
Commit 94495c5a11d31e258a42cabb5ca1487421fe5495
Headers show

Comments

Joe MacDonald - Aug. 1, 2013, 2:29 p.m.
From: Joe MacDonald <joe.macdonald@windriver.com>

The middle 'cut' in OECORE_NATIVE_SYSROOT isn't doing anything useful, so
remove it from the pipeline.

Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com>
---

Really a trivial optimization, I noticed this when I was looking for
something else.  It's possible the middle 'cut' is necessary in some
environments, but I wasn't able to reproduce a scenario where removing it
changed the results.

 -J.

 scripts/oe-find-native-sysroot |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/scripts/oe-find-native-sysroot b/scripts/oe-find-native-sysroot
index 9df9b44..81d62b8 100755
--- a/scripts/oe-find-native-sysroot
+++ b/scripts/oe-find-native-sysroot
@@ -40,10 +40,10 @@  if [ "x$OECORE_NATIVE_SYSROOT" = "x" ]; then
                 exit 1
             fi
             touch conf/sanity.conf
-            OECORE_NATIVE_SYSROOT=`bitbake -e | grep ^STAGING_DIR_NATIVE | cut -d '=' -f2 | cut -d '"' -f2`
+            OECORE_NATIVE_SYSROOT=`bitbake -e | grep ^STAGING_DIR_NATIVE | cut -d '"' -f2`
             rm -f conf/sanity.conf
         else
-            OECORE_NATIVE_SYSROOT=`bitbake -e | grep ^STAGING_DIR_NATIVE | cut -d '=' -f2 | cut -d '"' -f2`
+            OECORE_NATIVE_SYSROOT=`bitbake -e | grep ^STAGING_DIR_NATIVE | cut -d '"' -f2`
         fi
     else
         echo "Error: Unable to locate bitbake command."