recipetool: Proceed even with a missing license file

Whenever the recipe uses a CLOSED license, the list is going to be
empty. It's a discouraged practice not to have a license, but proceed
anyway to finish recipe generation.

(From OE-Core rev: 5ca920284d0946346f5b06f5e443c80d9d8b85ce)

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Vyacheslav Yurkov 2024-01-16 09:23:23 +01:00 committed by Richard Purdie
parent 4eca05e15b
commit 0576bd1edd

View File

@ -730,6 +730,12 @@ class GoRecipeHandler(RecipeHandler):
new_licenses = []
licenses = origvalue.split('\\')
for license in licenses:
if not license:
logger.warning("No license file was detected for the main module!")
# the license list of the main recipe must be empty
# this can happen for example in case of CLOSED license
# Fall through to complete recipe generation
continue
license = license.strip()
uri, chksum = license.split(';', 1)
url = urllib.parse.urlparse(uri)