User-requested update

Hello!

I integrated Mendor in my Yocto build. It looks very good.
But in the UI, I have a “Check for Updates” button. And I want to get from Mender the name of the next artifact after clicking on it. And if the next artifact is available, then a “Download and Install” button should appear in the UI. After clicking on it the update should be downloaded and installed.

What is the best way to implement this behavior?

  1. Improve the D-Bus application interface: add necessary functions.

  2. Change the mender-client by adding the necessary CLI command: to check for the next artifact, because “mender install” is already present.

  3. Check next artifact with your own script like this.

  4. Something other.

Hi @Zerg,

I would say it really depends on the exact use case, and the amount of code/contribution respectively maintenance you are willing to invest.
Shooting from the hip, I would go for 3): not have the Mender client running, but just check by that script upon user interaction, and if confirmed then start the client and have it download and install.

One thing to note thought. Is this flow because of a real technical requirement, or is it more like a “user expects this behaviour”? Because if it is just the latter, slighly sneaky way: just use the d-bus API and block in the ArtifactInstall_Enter stage. Notify the user, and when acknowledged, pause for a bunch of seconds to simulate the “downloading”, and then proceed. This has the advantages of not having any new features to create or maintain, plus the bonus that downloading can never fail once the button is pressed, so another error state you never have to handle.

Greetz,
Josef

Thanks, Josef.