* [ptxdist] [PATCH] report/sbom.py: ignore parameters for patches in series files
@ 2025-11-06 11:26 Michael Grzeschik
2025-12-04 13:14 ` [ptxdist] [APPLIED] " Michael Olbrich
0 siblings, 1 reply; 2+ messages in thread
From: Michael Grzeschik @ 2025-11-06 11:26 UTC (permalink / raw)
To: ptxdist
It is possible to have a parameter for patches in series
files like e.g. "-p0". This case will not work when parsing
the patches when generating the sbom, since the whole
string is taken to check in the path.exists check.
If the patch has parameters we skip those and only check for
the file which is always set first.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
scripts/report/sbom.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/report/sbom.py b/scripts/report/sbom.py
index 17acbe5e8..576197ce0 100644
--- a/scripts/report/sbom.py
+++ b/scripts/report/sbom.py
@@ -88,6 +88,8 @@ class SbomGenerator(Generator):
tag = m.group(1)
if line.startswith('#'):
continue
+ if len(line.split()) > 1:
+ line = line.split()[0]
patch = path.join(patch_dir, line.rstrip())
if not path.exists(patch):
raise ReportException(
--
2.47.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ptxdist] [APPLIED] report/sbom.py: ignore parameters for patches in series files
2025-11-06 11:26 [ptxdist] [PATCH] report/sbom.py: ignore parameters for patches in series files Michael Grzeschik
@ 2025-12-04 13:14 ` Michael Olbrich
0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2025-12-04 13:14 UTC (permalink / raw)
To: ptxdist; +Cc: Michael Grzeschik
Thanks, applied as b4f09bfbdd12f8bf04f88e2ca852461122b24b34.
Michael
[sent from post-receive hook]
On Thu, 04 Dec 2025 14:14:34 +0100, Michael Grzeschik <m.grzeschik@pengutronix.de> wrote:
> It is possible to have a parameter for patches in series
> files like e.g. "-p0". This case will not work when parsing
> the patches when generating the sbom, since the whole
> string is taken to check in the path.exists check.
>
> If the patch has parameters we skip those and only check for
> the file which is always set first.
>
> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> Message-Id: <20251106112614.2342635-1-m.grzeschik@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/scripts/report/sbom.py b/scripts/report/sbom.py
> index 17acbe5e88dc..576197ce0da1 100644
> --- a/scripts/report/sbom.py
> +++ b/scripts/report/sbom.py
> @@ -88,6 +88,8 @@ class SbomGenerator(Generator):
> tag = m.group(1)
> if line.startswith('#'):
> continue
> + if len(line.split()) > 1:
> + line = line.split()[0]
> patch = path.join(patch_dir, line.rstrip())
> if not path.exists(patch):
> raise ReportException(
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-12-04 13:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-06 11:26 [ptxdist] [PATCH] report/sbom.py: ignore parameters for patches in series files Michael Grzeschik
2025-12-04 13:14 ` [ptxdist] [APPLIED] " Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox