<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>9928</bug_id>
          
          <creation_ts>2016-07-13 17:26:40 +0000</creation_ts>
          <short_desc>yocto-bsp: logical if statements should be avoided in json return by list subcommand</short_desc>
          <delta_ts>2017-11-03 18:54:06 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>Scripts and Tools</component>
          <version>2.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>OBSOLETE</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.5 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Humberto Ibarra">humberto.ibarra.lopez</reporter>
          <assigned_to name="Daniela Plascencia">daniela.plascencia</assigned_to>
          <cc>leonardo.sandoval.gonzalez</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>63937</commentid>
    <comment_count>0</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2016-07-13 17:26:40 +0000</bug_when>
    <thetext>&apos;yocto-bsp list &lt;arch&gt; --properties&apos; returns some kind of json listing the properties of an arch. Since some of these properties vary depending on others, conditional &apos;ifs&apos; were added to the json making some kind pseudo-markup output.

This output is messy and weird and should be avoided. There should be a better way of showing this, specially considering that the json generated by yocto-bsp list &lt;arch&gt; --properties puts all its json body inside a string, which is odd and is not useful to anybody.

IFs shown on &apos;yocto-bsp list &lt;arch&gt; --properties&apos;:

&quot;if kernel_choice == &quot;linux-yocto_4.1&quot;:&quot; :
{
    &quot;smp&quot; :
{
        &quot;prio&quot; :
30
        &quot;filename&quot; :
/home/humberto/poky-dev/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.1.bbappend
        &quot;default&quot; :
y
        &quot;type&quot; :
boolean
        &quot;msg&quot; :
Do you need SMP support? (y/n)
    }
    &quot;new_kbranch&quot; :
{
        &quot;prio&quot; :
20
        &quot;filename&quot; :
/home/humberto/poky-dev/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.1.bbappend
        &quot;type&quot; :
choicelist
        &quot;branches_base&quot; :
standard
        &quot;default&quot; :
standard/base
        &quot;gen&quot; :
bsp.kernel.all_branches
        &quot;msg&quot; :
Please choose a machine branch to base this BSP on:
    }
    &quot;need_new_kbranch&quot; :
{
        &quot;prio&quot; :
20
        &quot;filename&quot; :
/home/humberto/poky-dev/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.1.bbappend
        &quot;default&quot; :
y
        &quot;type&quot; :
boolean
        &quot;msg&quot; :
Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]
    }
    &quot;existing_kbranch&quot; :
{
        &quot;prio&quot; :
20
        &quot;filename&quot; :
/home/humberto/poky-dev/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.1.bbappend
        &quot;type&quot; :
choicelist
        &quot;branches_base&quot; :
standard
        &quot;default&quot; :
standard/base
        &quot;gen&quot; :
bsp.kernel.all_branches
        &quot;msg&quot; :
Please choose a machine branch to base this BSP on:
    }
}


IFs obtained from &apos;yocto-bsp list &lt;arch&gt; --properties -o &lt;filename&gt;:

 &quot;if kernel_choice == \&quot;linux-yocto_4.4\&quot;:&quot;: {
  &quot;need_new_kbranch&quot;: {
   &quot;prio&quot;: &quot;20&quot;,
   &quot;filename&quot;: &quot;/home/humberto/poky-dev/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.4.bbappend&quot;,
   &quot;default&quot;: &quot;y&quot;,
   &quot;msg&quot;: &quot;Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]&quot;,
   &quot;type&quot;: &quot;boolean&quot;
  },
  &quot;new_kbranch&quot;: {
   &quot;default&quot;: &quot;standard/base&quot;,
   &quot;type&quot;: &quot;choicelist&quot;,
   &quot;prio&quot;: &quot;20&quot;,
   &quot;gen&quot;: &quot;bsp.kernel.all_branches&quot;,
   &quot;filename&quot;: &quot;/home/humberto/poky-dev/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.4.bbappend&quot;,
   &quot;msg&quot;: &quot;Please choose a machine branch to base this BSP on:&quot;,
   &quot;branches_base&quot;: &quot;standard&quot;
  },
  &quot;existing_kbranch&quot;: {
   &quot;default&quot;: &quot;standard/base&quot;,
   &quot;type&quot;: &quot;choicelist&quot;,
   &quot;prio&quot;: &quot;20&quot;,
   &quot;gen&quot;: &quot;bsp.kernel.all_branches&quot;,
   &quot;filename&quot;: &quot;/home/humberto/poky-dev/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.4.bbappend&quot;,
   &quot;msg&quot;: &quot;Please choose a machine branch to base this BSP on:&quot;,
   &quot;branches_base&quot;: &quot;standard&quot;
  },
  &quot;smp&quot;: {
   &quot;prio&quot;: &quot;30&quot;,
   &quot;filename&quot;: &quot;/home/humberto/poky-dev/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.4.bbappend&quot;,
   &quot;default&quot;: &quot;y&quot;,
   &quot;msg&quot;: &quot;Do you need SMP support? (y/n)&quot;,
   &quot;type&quot;: &quot;boolean&quot;
  }
 }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77213</commentid>
    <comment_count>1</comment_count>
    <who name="Daniela Plascencia">daniela.plascencia</who>
    <bug_when>2017-09-28 22:14:02 +0000</bug_when>
    <thetext>Moving to 2.5 M1. I will work on these bugs on 2.5.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77958</commentid>
    <comment_count>2</comment_count>
    <who name="Daniela Plascencia">daniela.plascencia</who>
    <bug_when>2017-11-03 18:54:06 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>