]> code.ossystems Code Review - openembedded-core.git/commitdiff
recipetool: Add logger info for missing license entries
authorStefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Fri, 8 Oct 2021 07:48:29 +0000 (09:48 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 14 Oct 2021 10:48:35 +0000 (11:48 +0100)
Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/recipetool/create.py

index 87b25ebc7e2df24a12abc1ddcbb08d9c47b9a4fe..a8c4cdef4ac657ad3b9cff447478288bf4393be0 100644 (file)
@@ -1128,6 +1128,9 @@ def guess_license(srctree, d):
             license, crunched_md5, lictext = crunch_license(licfile)
             if lictext and not license:
                 license = 'Unknown'
+                logger.info("Please add the following line for '%s' to a 'lib/recipetool/licenses.csv' " \
+                    "and replace `Unknown` with the license:\n" \
+                    "%s,Unknown" % (os.path.relpath(licfile, srctree), md5value))
         if license:
             licenses.append((license, os.path.relpath(licfile, srctree), md5value))