Browse Source

scanpypi: place a warning into *.mk file if licence id couldn't be detected

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>
(cherry picked from commit 0101ac62c81e468ba7fd47b991972a722cf1b43c)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Yegor Yefremov 7 years ago
parent
commit
31ce6e5081
1 changed files with 2 additions and 0 deletions
  1. 2 0
      utils/scanpypi

+ 2 - 0
utils/scanpypi

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