From: Stefan Herbrechtsmeier Date: Fri, 8 Oct 2021 07:48:28 +0000 (+0200) Subject: recipetool: ignore empty license files X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~6537 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a00720344d1996db9e4afff1c974b3158fb8dae7;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git recipetool: ignore empty license files Signed-off-by: Stefan Herbrechtsmeier Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index 893980a5cec..87b25ebc7e2 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py @@ -1126,9 +1126,10 @@ def guess_license(srctree, d): license = md5sums.get(md5value, None) if not license: license, crunched_md5, lictext = crunch_license(licfile) - if not license: + if lictext and not license: license = 'Unknown' - licenses.append((license, os.path.relpath(licfile, srctree), md5value)) + if license: + licenses.append((license, os.path.relpath(licfile, srctree), md5value)) # FIXME should we grab at least one source file with a license header and add that too?