Message ID | 20240917200310.3530-1-mark.hatle@kernel.crashing.org |
---|---|
State | Under Review |
Delegated to: | Steve Sakoman |
Headers | show |
Series | [scarthgap] create-sdpx-2.2.bbclass: Switch from exists to isfile checking debugsrc | expand |
diff --git a/meta/classes/create-spdx-2.2.bbclass b/meta/classes/create-spdx-2.2.bbclass index d104668ffd..ade1a04be3 100644 --- a/meta/classes/create-spdx-2.2.bbclass +++ b/meta/classes/create-spdx-2.2.bbclass @@ -315,7 +315,8 @@ def add_package_sources_from_debug(d, package_doc, spdx_package, package, packag debugsrc_path = search / debugsrc.replace('/usr/src/kernel/', '') else: debugsrc_path = search / debugsrc.lstrip("/") - if not debugsrc_path.exists(): + # We can only hash files below, skip directories, links, etc. + if not os.path.isfile(debugsrc_path): continue file_sha256 = bb.utils.sha256_file(debugsrc_path)