In a effort to debug YOCTO #15185, improve the logging when a package
file cannot be found in the list of SPDX files.

Signed-off-by: Joshua Watt <[email protected]>
---
 meta/classes/create-spdx-2.2.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/create-spdx-2.2.bbclass 
b/meta/classes/create-spdx-2.2.bbclass
index 844b674f6f1..3aa629852d8 100644
--- a/meta/classes/create-spdx-2.2.bbclass
+++ b/meta/classes/create-spdx-2.2.bbclass
@@ -302,7 +302,8 @@ def add_package_sources_from_debug(d, package_doc, 
spdx_package, package, packag
             if file_path.lstrip("/") == pkg_file.fileName.lstrip("/"):
                 break
         else:
-            bb.fatal("No package file found for %s" % str(file_path))
+            bb.fatal("No package file found for %s in %s; SPDX found: %s" % 
(str(file_path), package,
+                " ".join(p.fileName for p in package_files)))
             continue
 
         for debugsrc in file_data["debugsrc"]:
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#187531): 
https://lists.openembedded.org/g/openembedded-core/message/187531
Mute This Topic: https://lists.openembedded.org/mt/101316211/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to