Skip to content
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

Merged
merged 2 commits into from
Oct 24, 2017

Conversation

ejoerns
Copy link
Member

@ejoerns ejoerns commented Sep 19, 2017

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.

This fixes #14

@ejoerns ejoerns added the bug label Sep 19, 2017
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():
Copy link
Contributor

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.

Copy link
Member Author

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.

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')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

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')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

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')
Copy link
Contributor

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) ?

Copy link
Member Author

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>
@ejoerns
Copy link
Member Author

ejoerns commented Oct 13, 2017

I've added a patch to finally remove the True option to getVar() calls and based the dependency fix patch on it.

@ejoerns ejoerns merged commit e99d4c2 into rauc:master Oct 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing "do_image_complete" for kernel
2 participants