Bug 9211

Summary: base.bbclass: insufficient error handling for LIC_FILES_CHKSUM
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Patrick Ohly <patrick.ohly>
Component: coreAssignee: Aníbal Limón <anibal.limon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: meta.mr.watcher, meta.watcher
Version: 2.1   
Target Milestone: 2.2 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Patrick Ohly 2016-03-04 10:17:20 UTC
The following (incorrect)
   LIC_FILES_CHKSUM = "files://LICENSE;md5=4fbd65380cdd255951079008b364516c"
in a .bb recipe led to a rather obscure error with recent OE-core:

Parsing recipes...
ERROR: ExpansionError during parsing .../clr-systemd-config_98.bb: Failure expanding variable do_fetch[file-checksums], expression was ${@bb.fetch.get_checksum_file_list(d)}  ${@get_lic_checksum_file_list(d)} which triggered exception IndexError: string index out of range

Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Build step 'Execute shell' marked build as failure
Finished: FAILURE

The string index error is in "if path[0] == '/'" - path is empty in this case.

Note that LIC_FILES_CHKSUM uses "files" instead of "file". Not sure what older OE-core did with that.
Comment 1 Aníbal Limón 2016-05-11 16:42:51 UTC
I added a validation for notice the user about the MalformedURL in this case,

In review at,

http://lists.openembedded.org/pipermail/openembedded-core/2016-May/121256.html