Last active

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View task_level_exports.bbclass
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
# A class which enables task-level variable exports
#
# This allows one to export a variable without affecting the checksums of
# unrelated tasks for shared state.
#
# Example usage:
#
# inherit task_level_exports
#
# # Optional, but makes it explicit:
# TASKS_WITH_EXPORTS = "do_compile"
#
# do_compile[exports] += "SRCREV"
# do_compile_prepend () {
# bbfatal SRCREV: $SRCREV
# }
 
TASKS_WITH_EXPORTS ?= "${_ALL_TASKS}"
TASKS_WITH_EXPORTS[doc] = "List of tasks to enable. Defaults to all tasks"
TASKS_WITH_EXPORTS[type] = "list"
 
_ALL_TASKS = "${@' '.join(set(d.getVar('__BBTASKS') or []) - set(d.getVar('__BBDELTASKS') or []))}"
 
 
python () {
for task in oe.data.typed_value('TASKS_WITH_EXPORTS', d):
exports = d.getVarFlag(task, 'exports', True)
if exports is not None:
d.prependVarFlag(task, 'prefuncs', 'add_task_exports ')
d.appendVarFlag(task, 'vardeps', ' ' + exports)
}
 
 
python add_task_exports () {
task = d.getVar('BB_CURRENTTASK', True)
exports = d.getVarFlag('do_' + task, 'exports', True) or ''
for export in exports.split():
d.setVarFlag(export, 'export', '1')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.