mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
recipetool: Simplify common source files skip in guess_license
(From OE-Core rev: 189c0297632968900715d7a4a5edcdf3a56e25f5) 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:
parent
b8127b50e2
commit
7ab5afa819
|
@ -1188,10 +1188,11 @@ def guess_license(srctree, d):
|
||||||
|
|
||||||
licenses = []
|
licenses = []
|
||||||
licspecs = ['*LICEN[CS]E*', 'COPYING*', '*[Ll]icense*', 'LEGAL*', '[Ll]egal*', '*GPL*', 'README.lic*', 'COPYRIGHT*', '[Cc]opyright*', 'e[dp]l-v10']
|
licspecs = ['*LICEN[CS]E*', 'COPYING*', '*[Ll]icense*', 'LEGAL*', '[Ll]egal*', '*GPL*', 'README.lic*', 'COPYRIGHT*', '[Cc]opyright*', 'e[dp]l-v10']
|
||||||
|
skip_extensions = (".html", ".js", ".json", ".svg", ".ts")
|
||||||
licfiles = []
|
licfiles = []
|
||||||
for root, dirs, files in os.walk(srctree):
|
for root, dirs, files in os.walk(srctree):
|
||||||
for fn in files:
|
for fn in files:
|
||||||
if fn.endswith(".html") or fn.endswith(".js") or fn.endswith(".json") or fn.endswith(".svg") or fn.endswith(".ts"):
|
if fn.endswith(skip_extensions):
|
||||||
continue
|
continue
|
||||||
for spec in licspecs:
|
for spec in licspecs:
|
||||||
if fnmatch.fnmatch(fn, spec):
|
if fnmatch.fnmatch(fn, spec):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user