summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2021-09-01 08:44:44 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-03 09:53:28 +0100
commit69faca3df61409927c312e6f060faee945de0373 (patch)
tree481fc73c2ebe8be0dbfaac768143d33f4868d019 /meta
parentf1cd4f264d206a3bf9d95cc1e632a476299643e3 (diff)
downloadpoky-69faca3df61409927c312e6f060faee945de0373.tar.gz
classes/create-spdx: Add index to DEPLOYDIR
Add the index to DEPLOYDIR in addition to adding it to the SPDX archive (From OE-Core rev: 374dc08c0f22e98a267676f71308592d17f77d64) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/create-spdx.bbclass13
1 files changed, 11 insertions, 2 deletions
diff --git a/meta/classes/create-spdx.bbclass b/meta/classes/create-spdx.bbclass
index 5adad59065..14caae8a50 100644
--- a/meta/classes/create-spdx.bbclass
+++ b/meta/classes/create-spdx.bbclass
@@ -674,7 +674,16 @@ python image_combine_spdx() {
674 674
675 tar.addfile(info, fileobj=index_str) 675 tar.addfile(info, fileobj=index_str)
676 676
677 spdx_tar_link = imgdeploydir / (image_link_name + ".spdx.tar.zst") 677 def make_image_link(target_path, suffix):
678 spdx_tar_link.symlink_to(os.path.relpath(spdx_tar_path, spdx_tar_link.parent)) 678 link = imgdeploydir / (image_link_name + suffix)
679 link.symlink_to(os.path.relpath(target_path, link.parent))
680
681 make_image_link(spdx_tar_path, ".spdx.tar.zst")
682
683 spdx_index_path = imgdeploydir / (image_name + ".spdx.index.json")
684 with spdx_index_path.open("w") as f:
685 json.dump(index, f, sort_keys=True)
686
687 make_image_link(spdx_index_path, ".spdx.index.json")
679} 688}
680 689