Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Quentin Schulz <quentin.schulz@cherry.de>
To: Daniel Turull <daniel.turull@ericsson.com>,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Cc: Joshua Watt <JPEWhacker@gmail.com>,
	Peter Marko <peter.marko@siemens.com>
Subject: Re: [OE-core] [PATCH v4 1/3] spdx: add option to include only compiled sources
Date: Thu, 15 May 2025 15:58:57 +0200	[thread overview]
Message-ID: <11ac48b4-6831-4cf6-a071-9567fbfff2e6@cherry.de> (raw)
In-Reply-To: <PR3PR07MB66662659710253B1ED4F50E08A90A@PR3PR07MB6666.eurprd07.prod.outlook.com>

Hi Daniel,

On 5/15/25 3:44 PM, Daniel Turull wrote:
> Hi Quentin,
> Thanks. I'll dig a bit more for the header files if I can modify the 2nd patch in the series. [PATCH v4 2/3] kernel: add support to extract compiled files
> 
> About only excluding the c files, this is what the current code in spdx is doing (unless I made a mistake), anything other than c file, it returns always true in the is_compiled_source, so it is included in the spdx.
> 

My apologies, I clearly misread the code.

Please make the comment a bit clearer, like saying that we currently 
only support filtering C files, so we need to assume non-C files are 
compiled.

Re-reading the code, I'm wondering what you're actually trying to filter 
out with

if filename.rfind(".mod.c") > 0

? I see there are hidden files in my local build dir matching *.mod.cmd. 
Were you trying to catch those as well as *.mod.c?

Otherwise, You could simply check whether the file ends with .c with:

filename.endswith(".c")

If you want to check for mod.cmd as well:

filename.endswith((".c", "mod.cmd"))

You could also simply replace

     if filename in compiled_sources:
         return True
     return False

with

     return filename in compiled_sources

Cheers,
Quentin


  reply	other threads:[~2025-05-15 13:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-14 12:57 [PATCH v4 0/3] Check compiled files to filter kernel CVEs daniel.turull
2025-05-14 12:57 ` [PATCH v4 1/3] spdx: add option to include only compiled sources daniel.turull
2025-05-15 12:10   ` [OE-core] " Quentin Schulz
2025-05-15 13:12     ` Daniel Turull
2025-05-15 13:32       ` Quentin Schulz
2025-05-15 13:44         ` Daniel Turull
2025-05-15 13:58           ` Quentin Schulz [this message]
2025-05-15 14:04             ` Daniel Turull
2025-05-15 14:03       ` Richard Purdie
2025-05-15 14:09         ` Daniel Turull
2025-05-15 14:21           ` Richard Purdie
2025-05-15 14:24             ` Daniel Turull
2025-05-14 12:57 ` [PATCH v4 2/3] kernel: add support to extract compiled files daniel.turull
2025-05-14 12:57 ` [PATCH v4 3/3] improve_kernel_cve_report: add script for postprocesing of kernel CVE data daniel.turull

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=11ac48b4-6831-4cf6-a071-9567fbfff2e6@cherry.de \
    --to=quentin.schulz@cherry.de \
    --cc=JPEWhacker@gmail.com \
    --cc=daniel.turull@ericsson.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=peter.marko@siemens.com \
    /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