From: Vyacheslav Yurkov Date: Tue, 16 Jan 2024 08:23:23 +0000 (+0100) Subject: recipetool: Proceed even with a missing license file X-Git-Tag: uninative-4.4~446 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ca920284d0946346f5b06f5e443c80d9d8b85ce;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git 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. Signed-off-by: Vyacheslav Yurkov Signed-off-by: Richard Purdie --- diff --git a/scripts/lib/recipetool/create_go.py b/scripts/lib/recipetool/create_go.py index 668a24b8dd8..035ab9f7c14 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)