]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
lib/spdx30_tasks: improve error message
authorDmitry Baryshkov <dbaryshkov@gmail.com>
Fri, 19 Jul 2024 17:52:37 +0000 (20:52 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 21 Jul 2024 10:05:11 +0000 (11:05 +0100)
Improve 'unknown status' error message by including the CVE id and by
quoting status field. Otherwise it might be troublesome to understand
messages like 'do_create_spdx: Unknown CVE status ' (the status was
empty).

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/spdx30_tasks.py

index 59fd87507444748e992b1a817ec8cef75e1500bb..7baa6be70e3d2aa6c94294b1d4a9b2c97244c067 100644 (file)
@@ -688,7 +688,7 @@ def create_spdx(d):
                         else:
                             bb.fatal(f"Unknown detail '{detail}' for ignored {cve}")
                     else:
-                        bb.fatal(f"Unknown CVE status {status}")
+                        bb.fatal(f"Unknown {cve} status '{status}'")
 
             if all_cves:
                 pkg_objset.new_relationship(