summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/sbom.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/sbom.py')
-rw-r--r--meta/lib/oe/sbom.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/lib/oe/sbom.py b/meta/lib/oe/sbom.py
index 294feee10b..848812c0b7 100644
--- a/meta/lib/oe/sbom.py
+++ b/meta/lib/oe/sbom.py
@@ -28,10 +28,11 @@ def get_image_spdxid(img):
return "SPDXRef-Image-%s" % img
-def write_doc(d, spdx_doc, subdir):
+def write_doc(d, spdx_doc, subdir, spdx_deploy=None):
from pathlib import Path
- spdx_deploy = Path(d.getVar("SPDXDEPLOY"))
+ if spdx_deploy is None:
+ spdx_deploy = Path(d.getVar("SPDXDEPLOY"))
dest = spdx_deploy / subdir / (spdx_doc.name + ".spdx.json")
dest.parent.mkdir(exist_ok=True, parents=True)