From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>
Subject: Re: [ptxdist] [APPLIED] report/sbom.py: ignore parameters for patches in series files
Date: Thu, 4 Dec 2025 14:14:34 +0100 [thread overview]
Message-ID: <20251204131434.2195601-1-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <20251106112614.2342635-1-m.grzeschik@pengutronix.de>
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(
prev parent reply other threads:[~2025-12-04 13:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-06 11:26 [ptxdist] [PATCH] " Michael Grzeschik
2025-12-04 13:14 ` Michael Olbrich [this message]
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=20251204131434.2195601-1-m.olbrich@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=m.grzeschik@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox