diff options
author | Elizabeth Flanagan <elizabeth.flanagan@intel.com> | 2012-02-24 14:17:38 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-02-24 23:24:14 +0000 |
commit | d50dd280f52587b6225bc5db3c9e85f78107f5f5 (patch) | |
tree | 5923fc2823dc392a46b6a73985b1b27b9702bec5 /meta/classes/license.bbclass | |
parent | fa7bdf96b8eb8b5078db38249c5c60ec511c35c6 (diff) | |
download | openembedded-core-d50dd280f52587b6225bc5db3c9e85f78107f5f5.tar.gz openembedded-core-d50dd280f52587b6225bc5db3c9e85f78107f5f5.tar.bz2 openembedded-core-d50dd280f52587b6225bc5db3c9e85f78107f5f5.zip |
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.
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r-- | meta/classes/license.bbclass | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass index 10a937b10c..11908d90da 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass @@ -140,8 +140,20 @@ python do_populate_lic() { import shutil import oe.license - # All the license types for the package - license_types = d.getVar('LICENSE', True) + pn = d.getVar('PN', 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 lic_files = d.getVar('LIC_FILES_CHKSUM', True) pn = d.getVar('PN', True) |