-
Notifications
You must be signed in to change notification settings - Fork 88
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
classes/bundle: depend on do_deploy task for kernel and bootloader #19
Conversation
classes/bundle.bbclass
Outdated
do_fetch[depends] = "${@' '.join([d.getVar(image, True) + ":do_image_complete" for image in \ | ||
['RAUC_SLOT_' + slot for slot in d.getVar('RAUC_BUNDLE_SLOTS', True).split()]])}" | ||
python __anonymous() { | ||
for slot in d.getVar('RAUC_BUNDLE_SLOTS', True).split(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to pass True
to d.getVar()
, as this is the default since November 16.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's to be consistent with the rest of the code ;) But we should re-change this in the entire code to match again current default.
classes/bundle.bbclass
Outdated
slotflags = d.getVarFlags('RAUC_SLOT_%s' % slot) | ||
imgtype = slotflags.get('type') if slotflags else None | ||
if imgtype == 'kernel' or imgtype == 'boot': | ||
d.appendVarFlag('do_fetch', 'depends', ' ' + d.getVar('RAUC_SLOT_%s' % slot, True) + ':do_deploy') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
classes/bundle.bbclass
Outdated
if imgtype == 'kernel' or imgtype == 'boot': | ||
d.appendVarFlag('do_fetch', 'depends', ' ' + d.getVar('RAUC_SLOT_%s' % slot, True) + ':do_deploy') | ||
else: | ||
d.appendVarFlag('do_fetch', 'depends', ' ' + d.getVar('RAUC_SLOT_%s' % slot, True) + ':do_image_complete') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
classes/bundle.bbclass
Outdated
slotflags = d.getVarFlags('RAUC_SLOT_%s' % slot) | ||
imgtype = slotflags.get('type') if slotflags else None | ||
if imgtype == 'kernel' or imgtype == 'boot': | ||
d.appendVarFlag('do_fetch', 'depends', ' ' + d.getVar('RAUC_SLOT_%s' % slot, True) + ':do_deploy') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be a tiny bit nicer to use an intermediate image
variable instead of duplicating d.getVar('RAUC_SLOT_%s' % slot, True)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, might be a little nicer.
As getVar() now defaults to expanding by default, remove the True option from getVar() and getVarFlag() calls. Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Depending on `do_image_complete` task is valid for images but inappropriate for kernel and bootloader which do not have such a task. This changes the dependency auto-generation in order to honor the image `type` varflag provided and depend on the `do_deploy` task for kernel and bootloader. Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
5c203e3
to
3b47a59
Compare
I've added a patch to finally remove the True option to getVar() calls and based the dependency fix patch on it. |
Depending on
do_image_complete
task is valid for images butinappropriate for kernel and bootloader which do not have such a task.
This changes the dependency auto-generation in order to honor the image
type
varflag provided and depend on thedo_deploy
task for kerneland bootloader.
This fixes #14