From 0576bd1edd85f30ca941faf456ac229be5a547f4 Mon Sep 17 00:00:00 2001 From: Vyacheslav Yurkov Date: Tue, 16 Jan 2024 09:23:23 +0100 Subject: 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 Signed-off-by: Richard Purdie --- scripts/lib/recipetool/create_go.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scripts/lib') diff --git a/scripts/lib/recipetool/create_go.py b/scripts/lib/recipetool/create_go.py index 668a24b8dd..035ab9f7c1 100644 --- a/scripts/lib/recipetool/create_go.py +++ b/scripts/lib/recipetool/create_go.py @@ -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) -- cgit v1.2.3-54-g00ecf