rauc / meta-rauc

Yocto/Open Embedded meta layer for RAUC, the embedded Linux update framework
MIT License
165 stars 91 forks source link

bundle: RAUC_META_mysection[metadata] isn't expending variables anymore (kirkstone -> scarthgap) #335

Closed FederAndInk closed 3 months ago

FederAndInk commented 3 months ago

After the kirkstone -> scarthgap migration, meta varflags using yocto variables isn't working anymore

e.g:

RAUC_META_SECTIONS += "mysection"
RAUC_META_mysection[machine-name] = "${DISTRO}_${MACHINE}_${DISTRO_VERSION}"

will inject the mysection: machine-name=${DISTRO}_${MACHINE}_${DISTRO_VERSION} into the manifest as is

FederAndInk commented 3 months ago

It looks like it's been introduced here: https://github.com/rauc/meta-rauc/commit/ffba61f2f79ec03395629d8713a59226b0158d5f#diff-e5c2ad51d1ccb7561b62ea8e03cc127183911bb93f3b109efb41479a5d0d2631L334-L339

When changing d.getVarFlag to d.getVarFlags, d.getVarFlag expand parameter defaults to True, while d.getVarFlags does not.

jluebbe commented 3 months ago

For d.getVarFlags, one needs to pass a list of flags to expand, not just true.

It seems that the change to the metadata handling should be reverted. Do you want to make a PR?

FederAndInk commented 3 months ago

Sure