From: Prasanth R <ragaprasanth@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: paul@pbarker.dev, daniel.turull@ericsson.com,
Prasanth R <ragaprasanth@gmail.com>
Subject: [PATCH] improve_kernel_cve_report: always use the zstd tool
Date: Sat, 5 Dec 2026 22:07:25 +0900 [thread overview]
Message-ID: <20261205130725.4183998-1-ragaprasanth@gmail.com> (raw)
Run 'zstd -dc' instead of trying the python zstandard module first, so
there is only one code path to test. The zstd tool is a Yocto host
requirement.
Suggested-by: Paul Barker <paul@pbarker.dev>
AI-Generated: Uses Claude
Signed-off-by: Prasanth R <prasanth.r@lineo.co.jp>
---
Follow-up to Paul's review of "improve_kernel_cve_report: use the zstd
tool if zstandard is missing", which is already in master.
scripts/contrib/improve_kernel_cve_report.py | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/scripts/contrib/improve_kernel_cve_report.py b/scripts/contrib/improve_kernel_cve_report.py
index 3446527654..0b15395e36 100755
--- a/scripts/contrib/improve_kernel_cve_report.py
+++ b/scripts/contrib/improve_kernel_cve_report.py
@@ -241,18 +241,10 @@ def read_debugsources(file_path):
Read zstd file from pkgdata to extract sources
'''
import itertools
- # Decompress the .zst file
+ import subprocess
+ # Decompress the .zst file with the zstd host tool
cfiles = set()
- try:
- import zstandard as zstd
- with open(file_path, 'rb') as fh:
- with zstd.ZstdDecompressor().stream_reader(fh) as reader:
- decompressed_bytes = reader.read()
- except ImportError:
- # zstd is a Yocto host tool: use it if the python module is missing
- import subprocess
- decompressed_bytes = subprocess.run(["zstd", "-dc", file_path],
- check=True, capture_output=True).stdout
+ decompressed_bytes = subprocess.check_output(["zstd", "-dc", file_path])
json_data = json.loads(decompressed_bytes)
# We need to remove one level from the debug sources
for source_list in json_data.values():
--
2.34.1
reply other threads:[~2026-12-05 13:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261205130725.4183998-1-ragaprasanth@gmail.com \
--to=ragaprasanth@gmail.com \
--cc=daniel.turull@ericsson.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=paul@pbarker.dev \
/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.