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:25:52 +0000 |
commit | 5272e883ffe9f4b67ec0929730c43e6ad439d2a4 (patch) | |
tree | a890aa993762cd79963e1882e1bacee83f8d592b /meta/classes/license.bbclass | |
parent | cde25845a7a1aad24a520a726d1938453eee80e8 (diff) | |
download | poky-5272e883ffe9f4b67ec0929730c43e6ad439d2a4.tar.gz |
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>
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() { | |||
140 | import shutil | 140 | import shutil |
141 | import oe.license | 141 | import oe.license |
142 | 142 | ||
143 | # All the license types for the package | 143 | pn = d.getVar('PN', True) |
144 | license_types = d.getVar('LICENSE', True) | 144 | for package in d.getVar('PACKAGES', True): |
145 | if d.getVar('LICENSE_' + pn + '-' + package, True): | ||
146 | license_types = license_types + ' & ' + \ | ||
147 | d.getVar('LICENSE_' + pn + '-' + package, True) | ||
148 | |||
149 | #If we get here with no license types, then that means we have a recipe | ||
150 | #level license. If so, we grab only those. | ||
151 | try: | ||
152 | license_types | ||
153 | except NameError: | ||
154 | # All the license types at the recipe level | ||
155 | license_types = d.getVar('LICENSE', True) | ||
156 | |||
145 | # All the license files for the package | 157 | # All the license files for the package |
146 | lic_files = d.getVar('LIC_FILES_CHKSUM', True) | 158 | lic_files = d.getVar('LIC_FILES_CHKSUM', True) |
147 | pn = d.getVar('PN', True) | 159 | pn = d.getVar('PN', True) |