Reading 'Provides', 'Name' and other metadata from artifact is very slow

Hello.

We are using mender in an offline fashion. The user brings a usb-stick with them to update our device. They then use a local user interface to start the upgrade.

Lately we’ve been asked to show in the device user inteface the version that the device will have after the upgrade. I’ve experimented with the --software-version which will set a ‘Provides’ key-value pair on the rootfs-image. I’ve also tried embedding the version in the artifact name.

However, when executing mender-artifact read on the device this operation is really slow and takes way too long to be usable in an interactive user interface. It seems like the whole artifact is parsed.

I’ve tried to find ways with the available cli-tools to read this faster but I can’t find any way.

I could of course write a custom tool but it would be nice to not have to keep track of artifact format versions.

The device is running a linux system currently on Yocto 4, and planned to move to Yocto 5.

Are there any tools or tricks I could use?

Thanks in advance

Olof

Hi @OlofW,

Thanks for reaching out! Yeah indeed, mender-artifact is not exactly geared towards such a use case. While I guess this could be optimized (PR welcome!), I think for getting something done quick a custom script is probably easier. In the end the Artifact is just a tarball, so reading into it far enough to extract the metadata should not be too complicated.

If this is critical to you and you want to avoid the maintenance burden, then you can get in touch for sponsoring such an improvement too.

Greetz,
Josef

Thanks for the fast reply @TheYoctoJester

It was as I suspected then. I think our solution, at least at this stage, will be to get this info via a custom script. Especially since we are about to move from yocto4 to yocto5 which means we will change from the Go implementation to the C++.

Olof

1 Like