diff mbox series

[4/5] cve-check.bbclass: Cease forced symlink creation

Message ID 20250114153748.2358116-4-niko.mauno@vaisala.com
State New
Headers show
Series [1/5] vex.bbclass: Drop redundant import update_symlinks | expand

Commit Message

Niko Mauno Jan. 14, 2025, 3:37 p.m. UTC
Allow the method to work also when the user has overridden
IMAGE_LINK_NAME value as empty string.

Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
---
 meta/classes/cve-check.bbclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass
index 9f0a08becd..53f6a94b63 100644
--- a/meta/classes/cve-check.bbclass
+++ b/meta/classes/cve-check.bbclass
@@ -252,13 +252,15 @@  python cve_check_write_rootfs_manifest () {
 
     if enable_json:
         manifest_name_suffix = d.getVar("CVE_CHECK_MANIFEST_JSON_SUFFIX")
-        link_path = os.path.join(deploy_dir, "%s.%s" % (link_name, manifest_name_suffix))
         manifest_name = d.getVar("CVE_CHECK_MANIFEST_JSON")
 
         with open(manifest_name, "w") as f:
             json.dump(json_data, f, indent=2)
 
-        update_symlinks(manifest_name, link_path)
+        if link_name:
+            link_path = os.path.join(deploy_dir, "%s.%s" % (link_name, manifest_name_suffix))
+            update_symlinks(manifest_name, link_path)
+
         bb.plain("Image CVE JSON report stored in: %s" % manifest_name)
 }