recipetool: Skip common source files in guess_license

(From OE-Core rev: a930d39787dd77e10dfa7b7297af5fa04ca731ea)

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>
This commit is contained in:
Stefan Herbrechtsmeier 2021-10-08 09:48:26 +02:00 committed by Richard Purdie
parent 17798d21e0
commit f70715b54a

View File

@ -1114,6 +1114,8 @@ def guess_license(srctree, d):
licfiles = []
for root, dirs, files in os.walk(srctree):
for fn in files:
if fn.endswith(".html") or fn.endswith(".js") or fn.endswith(".json") or fn.endswith(".svg") or fn.endswith(".ts"):
continue
for spec in licspecs:
if fnmatch.fnmatch(fn, spec):
fullpath = os.path.join(root, fn)