diff mbox series

[4/4] license_image: Make use of exit_if_errors consistent

Message ID 20250728095936.1495441-5-philip.lorenz@bmw.de
State New
Headers show
Series Improve handling of build qa issues | expand

Commit Message

Philip Lorenz July 28, 2025, 9:59 a.m. UTC
`exit_if_errors` is typically called at the end of the outermost call
site (e.g. the task or hook calling a function which raises QA issues).
Adapt license_image accordingly.

Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
---
 meta/classes-recipe/license_image.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/classes-recipe/license_image.bbclass b/meta/classes-recipe/license_image.bbclass
index d2c5ab902ce..0d8cd7ab911 100644
--- a/meta/classes-recipe/license_image.bbclass
+++ b/meta/classes-recipe/license_image.bbclass
@@ -51,6 +51,8 @@  python license_create_manifest() {
     rootfs_license_manifest = os.path.join(d.getVar('LICENSE_DIRECTORY'),
                         d.getVar('SSTATE_PKGARCH'), d.getVar('IMAGE_NAME'), 'license.manifest')
     write_license_files(d, rootfs_license_manifest, pkg_dic, rootfs=True)
+
+    oe.qa.exit_if_errors(d)
 }
 
 def write_license_files(d, license_manifest, pkg_dic, rootfs=True):
@@ -116,7 +118,6 @@  def write_license_files(d, license_manifest, pkg_dic, rootfs=True):
                                        "The license listed %s was not in the "\
                                        "licenses collected for recipe %s"
                                        % (lic, pkg_dic[pkg]["PN"]), d)
-    oe.qa.exit_if_errors(d)
 
     # Two options here:
     # - Just copy the manifest