diff options
author | Niko Mauno <niko.mauno@vaisala.com> | 2025-05-12 15:52:28 +0000 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2025-05-19 08:32:49 -0700 |
commit | 848da2f632f22fa4934d74838c731ed9352a1816 (patch) | |
tree | be973c2df020acecd4428771c68594a874ab7d9b | |
parent | 8940ebb70a531599a3b159078f21ee9758d5a1c6 (diff) | |
download | poky-848da2f632f22fa4934d74838c731ed9352a1816.tar.gz |
cve-check.bbclass: Fix symlink handling also for text files
While backporting commit 7543e4e24a8b ("cve-check.bbclass: Mitigate
symlink related error") I failed to address the fact that in Scarthgap
this bbclass still generates also the text CVE file, in addition to the
JSON file.
In order to avoid the error that occurred with JSON files from
occurring now with CVE files:
ERROR: core-image-base-1.0-r0 do_image_complete: Recipe core-image-base is trying to install files into a shared area when those files already exist. The files and the manifests listing them are:
/home/poky/build/tmp/deploy/images/qemux86-64/.cve
(matched in manifest-qemux86_64-core-image-minimal.image_complete)
Please adjust the recipes so only one recipe provides a given file.
update the symlink handling for the text file variant too.
(From OE-Core rev: 81e702c85c62782dbedd5ca2a5e6569e6339dd60)
Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r-- | meta/classes/cve-check.bbclass | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass index badfee550c..6b8376bf17 100644 --- a/meta/classes/cve-check.bbclass +++ b/meta/classes/cve-check.bbclass | |||
@@ -270,13 +270,14 @@ python cve_check_write_rootfs_manifest () { | |||
270 | d.setVar("PN", save_pn) | 270 | d.setVar("PN", save_pn) |
271 | 271 | ||
272 | if enable_text: | 272 | if enable_text: |
273 | link_path = os.path.join(deploy_dir, "%s.cve" % link_name) | ||
274 | manifest_name = d.getVar("CVE_CHECK_MANIFEST") | 273 | manifest_name = d.getVar("CVE_CHECK_MANIFEST") |
275 | 274 | ||
276 | with open(manifest_name, "w") as f: | 275 | with open(manifest_name, "w") as f: |
277 | f.write(text_data) | 276 | f.write(text_data) |
278 | 277 | ||
279 | update_symlinks(manifest_name, link_path) | 278 | if link_name: |
279 | link_path = os.path.join(deploy_dir, "%s.cve" % link_name) | ||
280 | update_symlinks(manifest_name, link_path) | ||
280 | bb.plain("Image CVE report stored in: %s" % manifest_name) | 281 | bb.plain("Image CVE report stored in: %s" % manifest_name) |
281 | 282 | ||
282 | if enable_json: | 283 | if enable_json: |