diff options
author | Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> | 2021-10-20 09:40:14 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-23 17:42:28 +0100 |
commit | 7ab5afa819b364b5f0ec89848c452eefa95d2201 (patch) | |
tree | 9c3445c64e255dc89d1d72653229401d1bb903be /scripts/lib | |
parent | b8127b50e2f642c84046ed3636778d2fe6fb63bb (diff) | |
download | poky-7ab5afa819b364b5f0ec89848c452eefa95d2201.tar.gz |
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>
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/recipetool/create.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index 3b58d6fa82..5a267fb57c 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py | |||
@@ -1188,10 +1188,11 @@ def guess_license(srctree, d): | |||
1188 | 1188 | ||
1189 | licenses = [] | 1189 | licenses = [] |
1190 | licspecs = ['*LICEN[CS]E*', 'COPYING*', '*[Ll]icense*', 'LEGAL*', '[Ll]egal*', '*GPL*', 'README.lic*', 'COPYRIGHT*', '[Cc]opyright*', 'e[dp]l-v10'] | 1190 | licspecs = ['*LICEN[CS]E*', 'COPYING*', '*[Ll]icense*', 'LEGAL*', '[Ll]egal*', '*GPL*', 'README.lic*', 'COPYRIGHT*', '[Cc]opyright*', 'e[dp]l-v10'] |
1191 | skip_extensions = (".html", ".js", ".json", ".svg", ".ts") | ||
1191 | licfiles = [] | 1192 | licfiles = [] |
1192 | for root, dirs, files in os.walk(srctree): | 1193 | for root, dirs, files in os.walk(srctree): |
1193 | for fn in files: | 1194 | for fn in files: |
1194 | if fn.endswith(".html") or fn.endswith(".js") or fn.endswith(".json") or fn.endswith(".svg") or fn.endswith(".ts"): | 1195 | if fn.endswith(skip_extensions): |
1195 | continue | 1196 | continue |
1196 | for spec in licspecs: | 1197 | for spec in licspecs: |
1197 | if fnmatch.fnmatch(fn, spec): | 1198 | if fnmatch.fnmatch(fn, spec): |