Bug 15984

Summary: LICENSE_CREATE_PACKAGE is recipe-scope license
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ross Burton <ross.burton>
Component: coreAssignee: Unassigned <unassigned>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Medium CC: meta.mr.watcher, meta.watcher, randy.macleod
Version: 5.2   
Target Milestone: Future   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Ross Burton 2025-09-29 20:30:58 UTC
LICENSE_CREATE_PACKAGE create a single PN-lic package for the recipe's licenses.

It would be sensible if in cases where a single recipe produces multiple packages with their own licenses, there was a way to generate per-package -lic files with the correct licence texts.

(use-case: automated minimal license texts for linux-firmware)
Comment 1 Ross Burton 2025-09-29 20:34:02 UTC
Something along the lines of:

for each PKG in recipe
  copy all licences in LICENSE:$PKG to $datadir/licenses/$PKG/
  FILES:PKG-lic = $datadir/licenses/$PKG/
  PACKAGES += PKG-lic

(whereas the current code creates PN-lic for the recipe LICENSES and puts them all into $datadir/licenses)
Comment 2 Randy MacLeod 2025-10-02 14:46:25 UTC
We need to think carefully about the performance and scaling impact of such a proposed change - RP  (Randy)