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
Enhancement periods missed, moving into 2.2
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 'properties' and 'property' arguments to options for the list subcommand in the following way: (Listing karchs) yocto-bsp list karch (Listing all properties) yocto-bsp list <karch> --properties (Listing possible values for single property) yocto-bsp list <karch> --property <property>
it would be good if you put also here how it is currently done, to compare against the proposal.
The current syntax is: (Listing karchs) yocto-bsp list karch (Listing all properties) yocto-bsp list <karch> properties (Listing possible values for single property) yocto-bsp list <karch> property <property>
I don't think the new format is a deal breaker. I even consider it more appropriate for what we're doing there. (Sub arguments organize better instead of a long positional specification)
Sent patch https://lists.yoctoproject.org/pipermail/poky/2016-July/010610.html
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