All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts/oe-find-native-sysroot: fix get sysroot failed
@ 2025-06-11 12:23 Hongxu Jia
  2025-06-11 13:14 ` [OE-core] " Alexander Kanavin
  0 siblings, 1 reply; 3+ messages in thread
From: Hongxu Jia @ 2025-06-11 12:23 UTC (permalink / raw)
  To: openembedded-core

Calling oe-debuginfod in a build failed:
...
$ oe-debuginfod
|Getting sysroot...
|Error: NOTE: Reconnecting to bitbake server...
|NOTE: Retrying server connection (#1)... (18:55:53.009687)
|path-to-build/tmp/work/x86_64-linux/elfutils-native/0.192/recipe-sysroot-native doesn't exist.
|Have you run 'bitbake elfutils-native -caddto_recipe_sysroot'?
...

While calling bitbake-getvar to get sysroot, the output of bitbake-getvar
was mixed with output from bitbake
...
NOTE: Reconnecting to bitbake server...
...

Improve the output of bitbake-getvar, filter out unrelated message

BTW: bitbake-getvar --quiet (Silence bitbake server logging) could not
skip above "NOTE: Reconnecting to bitbake server..." message from bitbake

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 scripts/oe-find-native-sysroot | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/oe-find-native-sysroot b/scripts/oe-find-native-sysroot
index 6228efcbeec..778c16f5db8 100755
--- a/scripts/oe-find-native-sysroot
+++ b/scripts/oe-find-native-sysroot
@@ -38,7 +38,7 @@ fi
 # Global vars
 set_oe_native_sysroot(){
     echo "Getting sysroot..."
-    OECORE_NATIVE_SYSROOT=$(bitbake-getvar -r $1 --value STAGING_DIR_NATIVE)
+    OECORE_NATIVE_SYSROOT=$(bitbake-getvar -r $1 STAGING_DIR_NATIVE |grep '^STAGING_DIR_NATIVE='|sed -e 's/^STAGING_DIR_NATIVE=//' -e 's/"//g')
 }
 
 if [ "x$OECORE_NATIVE_SYSROOT" = "x" ]; then
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-12  5:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-11 12:23 [PATCH] scripts/oe-find-native-sysroot: fix get sysroot failed Hongxu Jia
2025-06-11 13:14 ` [OE-core] " Alexander Kanavin
2025-06-12  5:10   ` hongxu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.