mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 03:49:32 +02:00
license.bbclass: Gather Pkg level licenses
We should look for LICENSE at a package level first. If it's not found, we should use the recipe level LICENSE. This adds a bit more granularity to license manifests where needed. (From OE-Core rev: d50dd280f52587b6225bc5db3c9e85f78107f5f5) Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
cde25845a7
commit
5272e883ff
@@ -140,8 +140,20 @@ python do_populate_lic() {
|
|||||||
import shutil
|
import shutil
|
||||||
import oe.license
|
import oe.license
|
||||||
|
|
||||||
# All the license types for the package
|
pn = d.getVar('PN', True)
|
||||||
license_types = d.getVar('LICENSE', True)
|
for package in d.getVar('PACKAGES', True):
|
||||||
|
if d.getVar('LICENSE_' + pn + '-' + package, True):
|
||||||
|
license_types = license_types + ' & ' + \
|
||||||
|
d.getVar('LICENSE_' + pn + '-' + package, True)
|
||||||
|
|
||||||
|
#If we get here with no license types, then that means we have a recipe
|
||||||
|
#level license. If so, we grab only those.
|
||||||
|
try:
|
||||||
|
license_types
|
||||||
|
except NameError:
|
||||||
|
# All the license types at the recipe level
|
||||||
|
license_types = d.getVar('LICENSE', True)
|
||||||
|
|
||||||
# All the license files for the package
|
# All the license files for the package
|
||||||
lic_files = d.getVar('LIC_FILES_CHKSUM', True)
|
lic_files = d.getVar('LIC_FILES_CHKSUM', True)
|
||||||
pn = d.getVar('PN', True)
|
pn = d.getVar('PN', True)
|
||||||
|
|||||||
Reference in New Issue
Block a user