diff options
Diffstat (limited to 'meta/classes/create-spdx.bbclass')
-rw-r--r-- | meta/classes/create-spdx.bbclass | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/meta/classes/create-spdx.bbclass b/meta/classes/create-spdx.bbclass index 137db81a5b..47a8764bf0 100644 --- a/meta/classes/create-spdx.bbclass +++ b/meta/classes/create-spdx.bbclass | |||
@@ -835,16 +835,14 @@ python image_combine_spdx() { | |||
835 | 835 | ||
836 | combine_spdx(d, image_name, imgdeploydir, img_spdxid, packages) | 836 | combine_spdx(d, image_name, imgdeploydir, img_spdxid, packages) |
837 | 837 | ||
838 | if image_link_name: | ||
839 | image_spdx_path = imgdeploydir / (image_name + ".spdx.json") | ||
840 | image_spdx_link = imgdeploydir / (image_link_name + ".spdx.json") | ||
841 | image_spdx_link.symlink_to(os.path.relpath(image_spdx_path, image_spdx_link.parent)) | ||
842 | |||
843 | def make_image_link(target_path, suffix): | 838 | def make_image_link(target_path, suffix): |
844 | if image_link_name: | 839 | if image_link_name: |
845 | link = imgdeploydir / (image_link_name + suffix) | 840 | link = imgdeploydir / (image_link_name + suffix) |
846 | link.symlink_to(os.path.relpath(target_path, link.parent)) | 841 | if link != target_path: |
842 | link.symlink_to(os.path.relpath(target_path, link.parent)) | ||
847 | 843 | ||
844 | image_spdx_path = imgdeploydir / (image_name + ".spdx.json") | ||
845 | make_image_link(image_spdx_path, ".spdx.json") | ||
848 | spdx_tar_path = imgdeploydir / (image_name + ".spdx.tar.zst") | 846 | spdx_tar_path = imgdeploydir / (image_name + ".spdx.tar.zst") |
849 | make_image_link(spdx_tar_path, ".spdx.tar.zst") | 847 | make_image_link(spdx_tar_path, ".spdx.tar.zst") |
850 | spdx_index_path = imgdeploydir / (image_name + ".spdx.index.json") | 848 | spdx_index_path = imgdeploydir / (image_name + ".spdx.index.json") |