diff options
author | Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> | 2021-10-08 09:48:28 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-14 11:48:35 +0100 |
commit | a00720344d1996db9e4afff1c974b3158fb8dae7 (patch) | |
tree | c0748ffbb7889e4935ccf3f9d834a0403423dbd8 | |
parent | ab06305bf9a8ee2250aae8043e37119df2fbfc15 (diff) | |
download | openembedded-core-a00720344d1996db9e4afff1c974b3158fb8dae7.tar.gz |
recipetool: ignore empty license files
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>
-rw-r--r-- | scripts/lib/recipetool/create.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index 893980a5ce..87b25ebc7e 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? |