Interdependent subsequent updates

Hello everyone, I’m trying to understand what install sequence mender client will use if there are multiple pending updates of different types for a given device, but couldn’t find any information in docs. Will appreciate any information.

Disclaimer: I understand that Mender is mainly targeting atomic full-rootfs updates where the following wouldn’t be an issue, yet update-modules exist and mender artifact format seems to be designed to target this problematic.

So imagine a device was shipped out with rootfs A and was offline since. Since then, a number of updates released (but not installed as it was offline) for this device, for example:

A → A.1 → B → B.1 → C → C.1 → C.2

Let’s say that A, B, and C are full rootfs updates and .1 and .2 are patches created with Directory update module.

Considering that I haven’t used artifact_depends and similar features of mender-artifact, in which sequence these updates will be installed? Will the client go through every release in chronological order or will skip everything except the last one and will try to install C.2 patch on top of A? How will it behave if one of the updates have failed for any reason?


Now imagine I want to use mender-artifact features such as provides and depends to properly handle this scenario.
Let’s say my patches are only dependent on rootfs and not on previous patches. So when this device goes online, I would expect it to only install C and then C.2 and skip others as unnecessary. Is there a way to achieve this?

In general, any info that would help to understand how artifact_provides, artifact_depends work and how to use --provides, --depends, --provides-group, --depends-groups, --augment-provide, --augment-depends arguments of mender-artifact tool will be very welcomed. After understanding all this, I will try to contribute to the documentation. Thanks!

1 Like

Hello @ster, these flags aren’t currently respected. They are included in the format specification only to allow for future improvements to the Mender software, which is why they are so tersely documented. What you’re asking is not currently possible AFAIK, but it may be possible with future Mender releases.

Thanks for pointing this out!

But how the current software will behave then in case of multiple pending updates?

I believe the oldest one will always be attempted first.