summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorJeremy A. Puhlman <jpuhlman@mvista.com>2023-12-15 09:10:46 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-17 19:07:22 +0000
commita49de3ccc11faedf5a98963c39d67f8dd5bdf6e1 (patch)
treed6dffe3781e1f88ea97b2ad61c3ae07880f6244a /meta/classes
parent7d881f0214f9761990e52595d33246700c4da15c (diff)
downloadpoky-a49de3ccc11faedf5a98963c39d67f8dd5bdf6e1.tar.gz
create-spdx-2.2: combine spdx can try to write before dir creation
On occasion a file is attmpeded to be opened prior to the creation of the spdx_workdir. Create the directory before the open, just in case. File: '/build/layers/poky/meta/classes/create-spdx-2.2.bbclass', lineno: 1081, function: combine_spdx 1077: ) 1078: 1079: image_spdx_path = spdx_workdir / (rootfs_name + ".spdx.json") 1080: *** 1081: with image_spdx_path.open("wb") as f: 1082: doc.to_json(f, sort_keys=True, indent=get_json_indent(d)) (From OE-Core rev: bb9f2a9c0ff5dcdeaf1a0beb6a614d0d022a2481) Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/create-spdx-2.2.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/create-spdx-2.2.bbclass b/meta/classes/create-spdx-2.2.bbclass
index b0aef80db1..486efadba9 100644
--- a/meta/classes/create-spdx-2.2.bbclass
+++ b/meta/classes/create-spdx-2.2.bbclass
@@ -1075,7 +1075,7 @@ def combine_spdx(d, rootfs_name, rootfs_deploydir, rootfs_spdxid, packages, spdx
1075 "%s:%s" % (runtime_ref.externalDocumentId, runtime_doc.SPDXID), 1075 "%s:%s" % (runtime_ref.externalDocumentId, runtime_doc.SPDXID),
1076 comment="Runtime dependencies for %s" % name 1076 comment="Runtime dependencies for %s" % name
1077 ) 1077 )
1078 1078 bb.utils.mkdirhier(spdx_workdir)
1079 image_spdx_path = spdx_workdir / (rootfs_name + ".spdx.json") 1079 image_spdx_path = spdx_workdir / (rootfs_name + ".spdx.json")
1080 1080
1081 with image_spdx_path.open("wb") as f: 1081 with image_spdx_path.open("wb") as f: