]> code.ossystems Code Review - openembedded-core.git/commitdiff
license.bbclass: fix license manifest
authorJackie Huang <jackie.huang@windriver.com>
Mon, 11 Jan 2016 05:55:38 +0000 (13:55 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 17 Jan 2016 11:32:21 +0000 (11:32 +0000)
The license manifest is wrong when there is no spaces before and after separates |&()
and we can get warning like:
WARNING: The license listed Artistic-1.0GPLv1+ was not in the licenses collected for recipe

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/license.bbclass

index 6651d55c0171ce0fe9148341e4102ce7519757b6..8a428746003a521b9519b782ea17b95cc097c319 100644 (file)
@@ -70,7 +70,7 @@ def write_license_files(d, license_manifest, pkg_dic):
                 except oe.license.LicenseError as exc:
                     bb.fatal('%s: %s' % (d.getVar('P', True), exc))
             else:
-                pkg_dic[pkg]["LICENSES"] = re.sub('[|&()*]', '', pkg_dic[pkg]["LICENSE"])
+                pkg_dic[pkg]["LICENSES"] = re.sub('[|&()*]', ' ', pkg_dic[pkg]["LICENSE"])
                 pkg_dic[pkg]["LICENSES"] = re.sub('  *', ' ', pkg_dic[pkg]["LICENSES"])
                 pkg_dic[pkg]["LICENSES"] = pkg_dic[pkg]["LICENSES"].split()