rauc / meta-rauc

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

fix: bundle.bbclass: varflags expansion #289

Closed Jarsop closed 7 months ago

Jarsop commented 9 months ago

~Python anonymous functions are evaluated before = which expand the final variable value. This fix set the getVarFlags kwarg expand to True (default is False) to be able to assign varflag with bitbake variable (${...}) or python inline syntax (${@...}).~

Python anonymous functions are evaluated before the = sign and Python tasks do not expand variables. This fix introduces a set of varflags via RAUC_VARFLAGS_SLOTS and RAUC_VARFLAGS_HOOKS variables. It sets the getVarFlags keyword argument expand to the respective list (default is False). This allows for assigning varflags using bitbake variables (${...}) or Python inline syntax (${@...}).

Jarsop commented 9 months ago

Same remark with ci commit, see https://github.com/rauc/meta-rauc/pull/290#issuecomment-1802913597

Jarsop commented 9 months ago

@ejoerns Second commit introduce a refactoring as it's dependent from the first but it can be push through another branch if needed. BTW have we a test bundle recipes ? If no maybe can I create a dedicated test meta layer to have some test recipes to test our different classes ? (And sorry for the notifications noise but I had an issue with my git history...)

ejoerns commented 7 months ago

@Jarsop I really appreciate your changes! Especially the dict handling simplification looks really useful!

I have slightly modified the commit title to better match our conventions (removed conventional commit prefix).

@ejoerns Second commit introduce a refactoring as it's dependent from the first but it can be push through another branch if needed.

Should not be necessary, thx.

BTW have we a test bundle recipes ? If no maybe can I create a dedicated test meta layer to have some test recipes to test our different classes ? (And sorry for the notifications noise but I had an issue with my git history...)

No, we currently don't have but actually should. So feel free to make a proposal!

Jarsop commented 7 months ago

@Jarsop I really appreciate your changes! Especially the dict handling simplification looks really useful!

I have slightly modified the commit title to better match our conventions (removed conventional commit prefix).

You're welcome and thanks for the realignment.

No, we currently don't have but actually should. So feel free to make a proposal!

Ok, I will think about that and will make a proposal, maybe fake images, parsing around bitbake -e etc.

Jarsop commented 7 months ago

@ejoerns can we consider using kas to configure and build recipes/test images ?

ejoerns commented 7 months ago

@ejoerns can we consider using kas to configure and build recipes/test images ?

I'd prefer using new built-in layer tooling, but if kas actually gives a benefit there, I would not strictly be against it.