Bug 9927

Summary: yocto-bsp: listing properties stdout and data send to -o option should be the same
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Humberto Ibarra <humberto.ibarra.lopez>
Component: Scripts and ToolsAssignee: Daniela Plascencia <daniela.plascencia>
Status: RESOLVED OBSOLETE QA Contact:
Severity: normal    
Priority: Medium CC: leonardo.sandoval.gonzalez, ross.burton, sgw
Version: 2.2   
Target Milestone: 2.5 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Humberto Ibarra 2016-07-13 17:20:00 UTC
A json is saved if -o <filename> is given to 'yocto-bsp list <arch> --properties', this json is correctly formatted.

However, an output is also send to stdout, and is the same data but wrongly formatted:

[humberto@jhibarra-MOBL1 build]$ yocto-bsp list x86_64 --properties > propfile2
[humberto@jhibarra-MOBL1 build]$ yocto-bsp list x86_64 --properties -o propfile

In the last example propfile and propfile2 are not the same. While propfile is correctly formatted, propfile 2 is missing commas, enclosing branches and has weird 'if' keys such as :

"if kernel_choice == "linux-yocto-dev":" :
{
   "smp" : {
...
}
...
}

NOTE. propfile also has these if logical/json elements, but are formatted as strings:

"if kernel_choice == \"linux-yocto_4.4\":": {
  "need_new_kbranch": {
   "prio": "20",
   "filename": "/home/humberto/poky-dev/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.4.bbappend",
   "default": "y",
   "msg": "Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]",
   "type": "boolean"
  },

...
}"


It makes sense to have stdout and -o option show the same output since it is unclear if the output shown by stdout has some kind of advantage over the better formated -o output. However, if we are to show them exactly the same we could question why -o option is needed in the first place if we are going to send the same info to stdout.
Comment 1 Daniela Plascencia 2017-09-28 22:13:13 UTC
Moving to 2.5 M1. I'm planning to tackle these bugs during 2.5.
Comment 2 Daniela Plascencia 2017-11-03 18:53:26 UTC
The yocto-bsp script, along with yocto-layer and yocto-kernel, will be removed from public repositories soon as they are no longer maintained. The request was sent to the mailing list [1], meaning this issue is obsolete.

[1] https://lists.yoctoproject.org/pipermail/poky/2017-October/011135.html