summaryrefslogtreecommitdiffstats
path: root/meta/classes/create-spdx.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/create-spdx.bbclass')
-rw-r--r--meta/classes/create-spdx.bbclass10
1 files changed, 6 insertions, 4 deletions
diff --git a/meta/classes/create-spdx.bbclass b/meta/classes/create-spdx.bbclass
index 0a4db80aba..e44a204a8f 100644
--- a/meta/classes/create-spdx.bbclass
+++ b/meta/classes/create-spdx.bbclass
@@ -870,8 +870,9 @@ python image_combine_spdx() {
870 with image_spdx_path.open("wb") as f: 870 with image_spdx_path.open("wb") as f:
871 doc.to_json(f, sort_keys=True) 871 doc.to_json(f, sort_keys=True)
872 872
873 image_spdx_link = imgdeploydir / (image_link_name + ".spdx.json") 873 if image_link_name:
874 image_spdx_link.symlink_to(os.path.relpath(image_spdx_path, image_spdx_link.parent)) 874 image_spdx_link = imgdeploydir / (image_link_name + ".spdx.json")
875 image_spdx_link.symlink_to(os.path.relpath(image_spdx_path, image_spdx_link.parent))
875 876
876 num_threads = int(d.getVar("BB_NUMBER_THREADS")) 877 num_threads = int(d.getVar("BB_NUMBER_THREADS"))
877 878
@@ -942,8 +943,9 @@ python image_combine_spdx() {
942 tar.addfile(info, fileobj=index_str) 943 tar.addfile(info, fileobj=index_str)
943 944
944 def make_image_link(target_path, suffix): 945 def make_image_link(target_path, suffix):
945 link = imgdeploydir / (image_link_name + suffix) 946 if image_link_name:
946 link.symlink_to(os.path.relpath(target_path, link.parent)) 947 link = imgdeploydir / (image_link_name + suffix)
948 link.symlink_to(os.path.relpath(target_path, link.parent))
947 949
948 make_image_link(spdx_tar_path, ".spdx.tar.zst") 950 make_image_link(spdx_tar_path, ".spdx.tar.zst")
949 951