Bug 9867 - yocto-bsp: listing values for some properties throws exception
Summary: yocto-bsp: listing values for some properties throws exception
Status: RESOLVED FIXED
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.4 M1
Assignee: Daniela Plascencia
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-07-01 20:21 UTC by Humberto Ibarra
Modified: 2017-06-05 16:04 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Humberto Ibarra 2016-07-01 20:21:40 UTC
The command 'yocto-bsp list <karch> property <property_name>' is supposed to return the available values for the given property and kernel arch, but it is failing with some property names.

The command works for some cases but on other it shows as this:

[humberto@jhibarra-MOBL1 build]$ yocto-bsp list arm property existing_kbranch
Getting branches from remote repo None...
Traceback (most recent call last):
  File "/home/humberto/poky-test/scripts/yocto-bsp", line 150, in <module>
    ret = main()
  File "/home/humberto/poky-test/scripts/yocto-bsp", line 145, in main
    invoke_subcommand(args, parser, yocto_bsp_help_usage, subcommands)
  File "/home/humberto/poky-test/scripts/lib/bsp/help.py", line 73, in invoke_subcommand
    subcommands.get(args[0], subcommand_error)[0](args[1:], usage)
  File "/home/humberto/poky-test/scripts/yocto-bsp", line 104, in yocto_bsp_list_subcommand
    if not yocto_bsp_list(args, scripts_path, options.properties_file):
  File "/home/humberto/poky-test/scripts/lib/bsp/engine.py", line 1860, in yocto_bsp_list
    yocto_layer_list_property_values(arch, args[2], scripts_path, properties_file)
  File "/home/humberto/poky-test/scripts/lib/bsp/engine.py", line 1807, in yocto_layer_list_property_values
    values_list = input_line.gen_choices_list(context, False)
  File "/home/humberto/poky-test/scripts/lib/bsp/engine.py", line 428, in gen_choices_list
    choices = self.exec_listgen_fn(context)
  File "/home/humberto/poky-test/scripts/lib/bsp/engine.py", line 380, in exec_listgen_fn
    self.lineno, self.line)
  File "/home/humberto/poky-test/scripts/lib/bsp/engine.py", line 71, in parse_error
    raise SyntaxError("%s: %s" % (msg, line))
  File "<string>", line None
SyntaxError: function specified for 'gen' property returned nothing : input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base"
[humberto@jhibarra-MOBL1 build]$ 


Not sure which properties are causing this failure, only have experienced this with new_kbranch and existing_kbranch. Probably this is just as check that needs to return an error message instead of an exception.
Comment 1 Humberto Ibarra 2016-07-13 17:02:45 UTC
The conflict here is that 'existing_kbranch' property fails because it is encountered more than once and last value returned didn't have a branches base. It is odd to query it in the first place since it depends on knowing the specific kernel_choice being used and we don't have one here.

Will continue to check this one.
Comment 2 Leonardo Sandoval Gonzalez 2016-08-26 14:47:08 UTC
Plan to tackle this on M4.
Comment 3 Daniela Plascencia 2017-06-02 15:17:06 UTC
Some bbappend files inside scripts/lib/bsp pointed to kernel 4.8, a version that's no longer supported (see commits 6751dce4cf and 1632f6623c), affecting the execution of some scripts.
Regarding this bug, 'yocto-bsp list <karch> property <property_name>' expected the SRC_URI of the 4.8 kernel recipe, but failed as the file doesn't exist within poky anymore.
A patch removing such files has been sent to the mailing list for review.