]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
image.bbclass: print all QA functions exceptions
authorMauro Queiros <maurofrqueiros@gmail.com>
Tue, 7 Feb 2023 22:37:04 +0000 (22:37 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 9 Feb 2023 09:50:42 +0000 (09:50 +0000)
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)"

Signed-off-by: Mauro Queiros <maurofrqueiros@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/image.bbclass

index ce7d71815636dfe81ba1e33a4258f53a53d9d6c3..e0dfba4a4218f7454e2861e90e6cd263950db122 100644 (file)
@@ -319,7 +319,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')