mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
spdx: Fix license parsing
[YOCTO #14890] -- https://bugzilla.yoctoproject.org/show_bug.cgi?id=14890#c3 Since spaces in the license name are not mandatory, we need to add spaces around `|` and `&` before spliting. (From OE-Core rev: 28c704bdf731f1c5012b74e4fdb899622f15a7b1) Signed-off-by: Louis Rannou <lrannou@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
de8be85b9a
commit
beae214a45
@@ -167,7 +167,7 @@ def convert_license_to_spdx(lic, document, d, existing={}):
|
||||
|
||||
return spdx_license
|
||||
|
||||
lic_split = lic.replace("(", " ( ").replace(")", " ) ").split()
|
||||
lic_split = lic.replace("(", " ( ").replace(")", " ) ").replace("|", " | ").replace("&", " & ").split()
|
||||
|
||||
return ' '.join(convert(l) for l in lic_split)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user