Bug 10413

Summary: recipetool: use & to split licenses in LICENSE value
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paul Eggleton <bluelightning>
Component: Scripts and ToolsAssignee: Paul Eggleton <bluelightning>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: ross.burton
Version: 2.2   
Target Milestone: 2.3 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Paul Eggleton 2016-10-12 01:10:49 UTC
recipetool sets the LICENSE value based on licenses detected from the source tree. If there are multiple licenses then they get separated by spaces, but this isn't actually legal formatting and if you're using "devtool add" you get an immediate warning when the recipe is parsed internally.

Earlier I had made a conscious decision to do it this way since it's up to the user to figure out whether the multiple licenses should all apply (in which case they'd be separated with &) or if there is a choice of license (in which case | is the correct separator). However, I've come to the conclusion that we can just default to & and then the ugly warning goes away, and it's the safest alternative of the two (and most likely to be correct, since it's more common to have a codebase which is made up of code with different licenses, i.e. all of them apply to the combined work).

When we do this, we may need to tweak the comments to spell out that we've used & and that this would need to be changed if there is a choice instead.