diff mbox series

[v2,2/2] bitbake-getvar: use finalizeData tinfoil API to get identical result to "bitbake -e"

Message ID 20241114221725.3826753-2-yoann.congal@smile.fr
State Accepted, archived
Commit 68ae81dc93f86eab378fec2276561c5062263d7e
Headers show
Series [v2,1/2] tinfoil: add new "finalizeData" API | expand

Commit Message

Yoann Congal Nov. 14, 2024, 10:17 p.m. UTC
From: Yoann Congal <yoann.congal@smile.fr>

Fixes [YOCTO #15638]

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
---
v1->v2: Only call finalizeData() in the "not -r" case. In the "-r" case,
the data is already finalized and calling finalizeData() overwrite
correct data.
---
 bin/bitbake-getvar | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/bin/bitbake-getvar b/bin/bitbake-getvar
index 8901f99ae..20c0b696f 100755
--- a/bin/bitbake-getvar
+++ b/bin/bitbake-getvar
@@ -43,7 +43,9 @@  if __name__ == "__main__":
             d = tinfoil.parse_recipe(args.recipe)
         else:
             tinfoil.prepare(quiet=2, config_only=True)
-            d = tinfoil.config_data
+            # Expand keys and run anonymous functions to get identical result to
+            # "bitbake -e"
+            d = tinfoil.finalizeData()
 
         value = None
         if args.flag: