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

* Re: [OE-core] [PATCH] scripts/oe-find-native-sysroot: fix get sysroot failed
  2025-06-11 12:23 [PATCH] scripts/oe-find-native-sysroot: fix get sysroot failed Hongxu Jia
@ 2025-06-11 13:14 ` Alexander Kanavin
  2025-06-12  5:10   ` hongxu
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Kanavin @ 2025-06-11 13:14 UTC (permalink / raw)
  To: hongxu.jia; +Cc: openembedded-core

On Wed, 11 Jun 2025 at 14:23, hongxu via lists.openembedded.org
<hongxu.jia=eng.windriver.com@lists.openembedded.org> wrote:
> BTW: bitbake-getvar --quiet (Silence bitbake server logging) could not
> skip above "NOTE: Reconnecting to bitbake server..." message from bitbake

But it should, and it's better to fix that. Otherwise we have to
plaster similar workarounds everywhere where bitbake-getvar is used in
scripts.

I see e.g. 'bitbake-getvar --value BBLAYERS | tail -1' is used
elsewhere, presumably for similar reasons.

Alex


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

* Re: [PATCH] scripts/oe-find-native-sysroot: fix get sysroot failed
  2025-06-11 13:14 ` [OE-core] " Alexander Kanavin
@ 2025-06-12  5:10   ` hongxu
  0 siblings, 0 replies; 3+ messages in thread
From: hongxu @ 2025-06-12  5:10 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]

On Wed, Jun 11, 2025 at 06:14 AM, Alexander Kanavin wrote:

> 
> 
>> BTW: bitbake-getvar --quiet (Silence bitbake server logging) could not
>> skip above "NOTE: Reconnecting to bitbake server..." message from bitbake
> 
> But it should, and it's better to fix that. Otherwise we have to
> plaster similar workarounds everywhere where bitbake-getvar is used in
> scripts.

Sure, submitted patch to bitbake to skip noisy output for bitbake-getvar

https://lists.openembedded.org/g/bitbake-devel/message/17694?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3ACreated%2C%2C%2C20%2C2%2C0%2C113601893%2Cd%253D3&d=3

Please ignore this patch

//Hongxu

> 
> I see e.g. 'bitbake-getvar --value BBLAYERS | tail -1' is used
> elsewhere, presumably for similar reasons.
> 
> Alex

[-- Attachment #2: Type: text/html, Size: 1018 bytes --]

^ permalink raw reply	[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.