From: Mark Hatle <mark.hatle@kernel.crashing.org>
To: openembedded-core@lists.openembedded.org
Cc: mark.hatle@amd.com
Subject: [PATCH 1/2] spdx30_tasks.py: switch from exists to isfile checking debugsrc
Date: Wed, 24 Jul 2024 18:39:17 -0500 [thread overview]
Message-ID: <1721864358-26583-2-git-send-email-mark.hatle@kernel.crashing.org> (raw)
In-Reply-To: <1721864358-26583-1-git-send-email-mark.hatle@kernel.crashing.org>
From: Mark Hatle <mark.hatle@amd.com>
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.
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
---
meta/lib/oe/spdx30_tasks.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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(
if file_sha256 is None:
continue
else:
- if not debugsrc_path.exists():
+ # We can only hash files below, skip directories, links, etc.
+ if not debugsrc_path.isfile():
source_hash_cache[debugsrc_path] = None
continue
--
2.34.1
next prev parent reply other threads:[~2024-07-24 23:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-24 23:39 [PATCH 0/2] SDKs w/ multilibs and spdx30 'isfile' Mark Hatle
2024-07-24 23:39 ` Mark Hatle [this message]
2024-07-24 23:39 ` [PATCH 2/2] create-spdx-*: Support multilibs via SPDX_MULTILIB_SSTATE_ARCHS Mark Hatle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1721864358-26583-2-git-send-email-mark.hatle@kernel.crashing.org \
--to=mark.hatle@kernel.crashing.org \
--cc=mark.hatle@amd.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.