]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
recipetool: Proceed even with a missing license file
authorVyacheslav Yurkov <uvv.mail@gmail.com>
Tue, 16 Jan 2024 08:23:23 +0000 (09:23 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 19 Jan 2024 11:53:56 +0000 (11:53 +0000)
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 <uvv.mail@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/recipetool/create_go.py

index 668a24b8dd8ed7f5965902e0a42897c3024bf46e..035ab9f7c14405a0b25ef5e17255759f699f6502 100644 (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)