@@ -187,6 +187,10 @@ def get_verity_fstypes(d):
verity_hash = d.getVar('DM_VERITY_SEPARATE_HASH')
pn = d.getVar('PN')
+ if not verity_image or not verity_type:
+ bb.warnonce('dm-verity-img class inherited in %s but not used' % pn)
+ return ""
+
fstypes = ""
if not pn.endswith(verity_image):
return fstypes # This doesn't concern this image
@@ -207,7 +211,6 @@ python __anonymous() {
pn = d.getVar('PN')
if not verity_image or not verity_type:
- bb.warn('dm-verity-img class inherited but not used')
return
if not pn.endswith(verity_image):
The `get_verity_fstypes` function is used in the expansion of `IMAGE_FSTYPES` right below this function, so if verity_image or verity_type is unset, we should warn here. The original warning in the __anonymous block below, is never reached, because the expansion of IMAGE_FSTYPES results in a parsing error Signed-off-by: Frede Hoey Braendstrup <frederikbraendstrup@gmail.com> --- classes/dm-verity-img.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --