Add variables to add arbitrary hooks into postfuncs and cleandirs. This is required by SPDX to capture the files created in the image functions. In addition, report the image type in a similar manner to subimages so that the hooks can know the original image type
Signed-off-by: Joshua Watt <[email protected]> --- meta/classes-recipe/image.bbclass | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass index 28be6c63623..f5c8c8caeee 100644 --- a/meta/classes-recipe/image.bbclass +++ b/meta/classes-recipe/image.bbclass @@ -351,6 +351,9 @@ python setup_debugfs () { setup_debugfs_variables(d) } +IMAGE_TASK_POSTFUNCS ?= "" +IMAGE_TASK_CLEANDIRS ?= "" + python () { vardeps = set() # We allow CONVERSIONTYPES to have duplicates. That avoids breaking @@ -507,12 +510,15 @@ python () { d.setVar(task, '\n'.join(cmds)) d.setVarFlag(task, 'func', '1') d.setVarFlag(task, 'fakeroot', '1') + d.setVarFlag(task, 'imagetype', realt) d.appendVarFlag(task, 'prefuncs', ' ' + debug + ' set_image_size') d.prependVarFlag(task, 'postfuncs', 'create_symlinks ') d.appendVarFlag(task, 'subimages', ' ' + ' '.join(subimages)) d.appendVarFlag(task, 'vardeps', ' ' + ' '.join(vardeps)) d.appendVarFlag(task, 'vardepsexclude', ' DATETIME DATE ' + ' '.join(vardepsexclude)) + d.appendVarFlag(task, 'postfuncs', ' ' + d.getVar("IMAGE_TASK_POSTFUNCS")) + d.appendVarFlag(task, 'cleandirs', ' ' + d.getVar("IMAGE_TASK_CLEANDIRS")) bb.debug(2, "Adding task %s before %s, after %s" % (task, 'do_image_complete', after)) bb.build.addtask(task, 'do_image_complete', after, d) -- 2.43.2
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#199815): https://lists.openembedded.org/g/openembedded-core/message/199815 Mute This Topic: https://lists.openembedded.org/mt/106267879/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
