<?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>8321</bug_id>
          
          <creation_ts>2015-09-17 19:01:41 +0000</creation_ts>
          <short_desc>yocto-bsp script should use argparse instead of optparse library</short_desc>
          <delta_ts>2016-07-07 14:58:32 +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>1.8</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.2 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</reporter>
          <assigned_to name="Humberto Ibarra">humberto.ibarra.lopez</assigned_to>
          <cc>benjamin.esquivel</cc>
    
    <cc>jose.perez.carranza</cc>
    
    <cc>ross.burton</cc>
    
    <cc>tom.zanussi</cc>
          
          <qa_contact name="David Rodriguez">david.israelx.rodriguez.castellanos</qa_contact>
          <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>54239</commentid>
    <comment_count>0</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2015-09-17 19:01:41 +0000</bug_when>
    <thetext>The script yocto-bsp is using the deprecated library optparse to parse the command line arguments which according to the official documentation it is deprecated [1] since 2.7. Corresponding script and libraries should use argparse instead [2].

[1] https://docs.python.org/2/library/optparse.html
[2] https://docs.python.org/2/library/argparse.html#module-argparse</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59695</commentid>
    <comment_count>1</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2016-03-03 17:40:53 +0000</bug_when>
    <thetext>Enhancement periods missed, moving into 2.2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62661</commentid>
    <comment_count>2</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2016-06-06 16:30:21 +0000</bug_when>
    <thetext>The current syntax needs to be changed for the list subcommand. Still this bug is not about re-factoring yocto-bsp so will propose a change that works for argparse but altering as little as possible.

The proposed approach is to change &apos;properties&apos; and &apos;property&apos; arguments to options for the list subcommand in the following way: 

(Listing karchs)
yocto-bsp list karch

(Listing all properties)
yocto-bsp list &lt;karch&gt; --properties

(Listing possible values for single property)
yocto-bsp list &lt;karch&gt; --property &lt;property&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62662</commentid>
    <comment_count>3</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-06-06 16:33:34 +0000</bug_when>
    <thetext>it would be good if you put also here how it is currently done, to compare against the proposal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62663</commentid>
    <comment_count>4</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2016-06-06 16:40:25 +0000</bug_when>
    <thetext>The current syntax is:

(Listing karchs)
yocto-bsp list karch

(Listing all properties)
yocto-bsp list &lt;karch&gt; properties

(Listing possible values for single property)
yocto-bsp list &lt;karch&gt; property &lt;property&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62664</commentid>
    <comment_count>5</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-06-06 16:52:57 +0000</bug_when>
    <thetext>I don&apos;t think the new format is a deal breaker. I even consider it more appropriate for what we&apos;re doing there. (Sub arguments organize better instead of a long positional specification)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63640</commentid>
    <comment_count>6</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2016-07-04 20:32:25 +0000</bug_when>
    <thetext>Sent patch

https://lists.yoctoproject.org/pipermail/poky/2016-July/010610.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63723</commentid>
    <comment_count>7</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2016-07-07 14:58:32 +0000</bug_when>
    <thetext>Already in master

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=4ab8650eebce905f6c6eb8fc6f1b042389bc992e

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=479d15b32691def9de4f4d792ee077168b956635

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=4e889c04ba518dac492c193224a790a877f43f40</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>