image, populate_sdk_base: warn on ';' in *_COMMAND function lists
PATCH 1/1 image, populate_sdk_base: warn on ';' in *_COMMAND function lists
From: Etienne Cordonnier <[email protected]>
Since c3365dfd9ddd ("classes: Drop ';' delimiter from ROOTFS/IMAGE*COMMAND variables") these variables are space separated function lists, used as vardeps of themselves. A stray ';' is still tolerated when the list is executed, but at parse time "func;" names no variable, so the function is not part of the do_rootfs/do_image/do_populate_sdk signature and a stale rootfs or SDK can be reused from sstate.
Warn when a variable from rootfs_command_variables() or sdk_command_variables() contains ';'. Tested by adding "foo;" entries and checking the warning, and that stock core-image-minimal parses without it.
AI-Generated: Uses Claude Code (claude-sonnet-5-5)
--- meta/classes-recipe/image.bbclass | 7 ++++++- meta/classes-recipe/populate_sdk_base.bbclass | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-)
meta/classes-recipe/image.bbclass +6 -1
@@ -127,7 +127,12 @@ def rootfs_command_variables(d): python () { variables = rootfs_command_variables(d) for var in variables: - d.setVarFlag(var, 'vardeps', d.getVar(var)) + value = d.getVar(var) + if value and ';' in value: + bb.warn("%s contains ';' but is a space separated list of functions, " + "remove the ';' delimiters or the functions will not be part " + "of the task signature: %s" % (var, value.strip())) + d.setVarFlag(var, 'vardeps', value) } def rootfs_variables(d):
meta/classes-recipe/populate_sdk_base.bbclass +6 -1
@@ -423,7 +423,12 @@ do_populate_sdk[vardeps] += "${@sdk_variables(d)}" python () { variables = sdk_command_variables(d) for var in variables: - d.setVarFlag(var, 'vardeps', d.getVar(var)) + value = d.getVar(var) + if value and ';' in value: + bb.warn("%s contains ';' but is a space separated list of functions, " + "remove the ';' delimiters or the functions will not be part " + "of the task signature: %s" % (var, value.strip())) + d.setVarFlag(var, 'vardeps', value) } do_populate_sdk[file-checksums] += "${TOOLCHAIN_SHAR_REL_TMPL}:True \
Signature · 1 line
2.43.0