diff options
author | Mark Hatle <mark.hatle@amd.com> | 2024-07-24 18:39:17 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-07-26 12:28:42 +0100 |
commit | 0328f2a585be350eee229dc05c0ed8163b61b47c (patch) | |
tree | ad3c75416b0fb29d7da56a90cfb544d51c47a67d /meta | |
parent | 09b49a35e1cd68f2e7aac35c8094adfc3ca38685 (diff) | |
download | poky-0328f2a585be350eee229dc05c0ed8163b61b47c.tar.gz |
spdx30_tasks.py: switch from exists to isfile checking debugsrc
Same change as previously made to the create-spdx-2.2.bbclass,
while debugsrc is almost always a file (or link), there are apparently
cases where a directory could be returned from the dwarfsrcfiles
processing. When this happens, the hashing fails and an error results
when building the SPDX documents.
(From OE-Core rev: 5262f9bbf86c4e529ff988d465ddad2d1db0b073)
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oe/spdx30_tasks.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/lib/oe/spdx30_tasks.py b/meta/lib/oe/spdx30_tasks.py index 7baa6be70e..9d5bbadc0f 100644 --- a/meta/lib/oe/spdx30_tasks.py +++ b/meta/lib/oe/spdx30_tasks.py | |||
@@ -238,7 +238,8 @@ def get_package_sources_from_debug( | |||
238 | if file_sha256 is None: | 238 | if file_sha256 is None: |
239 | continue | 239 | continue |
240 | else: | 240 | else: |
241 | if not debugsrc_path.exists(): | 241 | # We can only hash files below, skip directories, links, etc. |
242 | if not debugsrc_path.isfile(): | ||
242 | source_hash_cache[debugsrc_path] = None | 243 | source_hash_cache[debugsrc_path] = None |
243 | continue | 244 | continue |
244 | 245 | ||