scanpypi: place a warning into *.mk file if licence id couldn't be detected
authorYegor Yefremov <yegorslists@googlemail.com>
Fri, 31 Aug 2018 15:07:46 +0000 (17:07 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Fri, 31 Aug 2018 21:12:57 +0000 (23:12 +0200)
If a license file could be found, but license id couldn't be detected place
following warning into *.mk file:

FOO_LICENSE = FIXME: license id couldn't be detected

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
utils/scanpypi

index 12c96b842e0c64a6e3a439c42ab90a7ac9906627..31e242e3db5a4e3340d6eac007ae407f9016c165 100755 (executable)
@@ -444,6 +444,8 @@ class BuildrootPackage():
                     match = liclookup.match(lic_file.read())
                 if match is not None and match.confidence >= 90.0:
                     license_names.append(match.license.id)
+                else:
+                    license_names.append("FIXME: license id couldn't be detected")
 
             if len(license_names) > 0:
                 license_line = ('{name}_LICENSE ='