-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: bundle.bbclass: varflags expansion #289
Conversation
Same remark with ci commit, see #290 (comment) |
62361bf
to
27faf42
Compare
dbd96fc
to
992e1f0
Compare
@ejoerns Second commit introduce a refactoring as it's dependent from the first but it can be push through another branch if needed. |
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 (`${@...}`). Signed-off-by: Jean-Pierre Geslin <[email protected]>
By assigning a dictionary as a default value, the code can be greatly simplified. This makes the code clearer and more "Pythonic". Signed-off-by: Jean-Pierre Geslin <[email protected]>
992e1f0
to
71086ac
Compare
@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).
Should not be necessary, thx.
No, we currently don't have but actually should. So feel free to make a proposal! |
You're welcome and thanks for the realignment.
Ok, I will think about that and will make a proposal, maybe fake images, parsing around |
backported to |
Python anonymous functions are evaluated before=
which expand the final variable value. This fix set thegetVarFlags
kwargexpand
toTrue
(default isFalse
) 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 viaRAUC_VARFLAGS_SLOTS
andRAUC_VARFLAGS_HOOKS
variables.It sets the
getVarFlags
keyword argumentexpand
to the respective list (default isFalse
). This allows for assigning varflags using bitbake variables (${...}
) or Python inline syntax (${@...}
).