lib: license_finder: Ignore non-files in license directories
PATCH 1/1 lib: license_finder: Ignore non-files in license directories
We would like to move the SPDX license exception files to a subdirectory, but that breaks the license finder code since it assumes everything in the license directory is a file and fails when it is a directory.
Signed-off-by Joshua Watt <[email protected]>
--- meta/lib/oe/license_finder.py | 2 ++ 1 file changed, 2 insertions(+)
meta/lib/oe/license_finder.py +2 -0
@@ -48,6 +48,8 @@ def _crunch_known_licenses(d): for lic_dir in lic_dirs: for fn in os.listdir(lic_dir): path = os.path.join(lic_dir, fn) + if not os.path.isfile(path): + continue # Hash the exact contents md5value = bb.utils.md5_file(path) md5sums[md5value] = fn
Signature · 1 line
2.55.0