Skip to contentSkip to conversation

image.bbclass: print all QA functions exceptions

PATCH New [email protected] 1 participant 1 message Feb 7, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 image.bbclass: print all QA functions exceptions

From: Mauro Queiros <[email protected]>

For the QA checks in image.bbclass, all exceptions other than oe.utils.ImageQAFailed always print the following generic message:
"Image QA function func_name failed"

This can be very misleading, as it may hide python syntax errors and other kind of issues that are hard to detect without more explicit error messages.

This change makes sure that the error message of all exceptions are displayed.

Before this change:
"Image QA function func_name failed"

After this change:
"Image QA function func_name failed: f-string: empty expression not allowed (<string>, line 13)"

---
 meta/classes/image.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/image.bbclass +1 -1
index c424c4c41d..a58d900ed0 100644
@@ -313,7 +313,7 @@ fakeroot python do_image_qa () {
         except oe.utils.ImageQAFailed as e:
             qamsg = qamsg + '\tImage QA function %s failed: %s\n' % (e.name, e.description)
         except Exception as e:
-            qamsg = qamsg + '\tImage QA function %s failed\n' % cmd
+            qamsg = qamsg + '\tImage QA function %s failed: %s\n' % (cmd, e)
 
     if qamsg:
         imgname = d.getVar('IMAGE_NAME')
Signature · 1 line
2.25.1