Bug 9927 - yocto-bsp: listing properties stdout and data send to -o option should be the same
Summary: yocto-bsp: listing properties stdout and data send to -o option should be the...
Status: RESOLVED OBSOLETE
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.5 M1
Assignee: Daniela Plascencia
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-07-13 17:20 UTC by Humberto Ibarra
Modified: 2017-11-03 18:53 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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