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>
This commit is contained in:
Joshua Watt
2021-09-01 08:44:44 -05:00
committed by Richard Purdie
parent f1cd4f264d
commit 69faca3df6

View File

@@ -674,7 +674,16 @@ python image_combine_spdx() {
tar.addfile(info, fileobj=index_str)
spdx_tar_link = imgdeploydir / (image_link_name + ".spdx.tar.zst")
spdx_tar_link.symlink_to(os.path.relpath(spdx_tar_path, spdx_tar_link.parent))
def make_image_link(target_path, suffix):
link = imgdeploydir / (image_link_name + suffix)
link.symlink_to(os.path.relpath(target_path, link.parent))
make_image_link(spdx_tar_path, ".spdx.tar.zst")
spdx_index_path = imgdeploydir / (image_name + ".spdx.index.json")
with spdx_index_path.open("w") as f:
json.dump(index, f, sort_keys=True)
make_image_link(spdx_index_path, ".spdx.index.json")
}