Bug 13971

Summary: [devtool] requires LIC_FILES_CHKSUM to be set, even for LICENSE=CLOSED
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Bjarne Michelsen <bjarne_michelsen>
Component: Scripts and ToolsAssignee: Unassigned <unassigned>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Undecided CC: richard.purdie, ross.burton
Version: unspecified   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Bjarne Michelsen 2020-07-06 05:13:33 UTC
When using `devtool upgrade <component>`, devtool requires LIC_FILES_CHKSUM to be set in the recipe, even if the recipe uses `LICENSE=CLOSED`

To reproduce:

1. Create a recipe with `LICENSE=CLOSED` but no `LIC_CHKSUM`
2. Run `devtool upgrade <component>`

Result:

```
Traceback (most recent call last):
  File "sources/poky/scripts/devtool", line 334, in <module>
    ret = main()
  File "sources/poky/scripts/devtool", line 321, in main
    ret = args.func(args, config, basepath, workspace)
  File "sources/poky/scripts/lib/devtool/upgrade.py", line 553, in upgrade
    old_licenses = _extract_licenses(srctree, rd.getVar('LIC_FILES_CHKSUM'))
  File "sources/poky/scripts/lib/devtool/upgrade.py", line 457, in _extract_licenses
    for url in recipe_licenses.split():
AttributeError: 'NoneType' object has no attribute 'split'
```