Usage of `MENDER_ARTIFACT_NAME` bitbake variable

I haven’t been able to work out exactly how to use the MENDER_ARTIFACT_NAME bitbake variable. It seems like this should be unique per-image, yet it needs to be set at a build wide (i.e. machine) level for the build to pass. It looks like this ends up in the image through the mender-artifact-info.bb recipe which obviously can’t change on a per-image basis. Is there a way to truly set this on a per-image basis in the case where you have more than one image per a machine?

Also, it’s a little unclear on exactly how this information is used. Currently we are using mender in standalone and it seems like this setting doesn’t have an effect. Is that assessment true?

This thread covers a good use-case of this variable in Yocto.

But essentially this is your “version” of the image. Beside that it is used by mender-artifact-info.bb, this information is also embedded in to the .mender files, and would be parsed and displayed if this file is uploaded to an Mender server.

Currently we are using mender in standalone and it seems like this setting doesn’t have an effect. Is that assessment true?

In standalone mode this has very little (or none impact). In managed mode, the content of this variable would be reported to the Mender server for sanity checks (skip deployment if device is already running with image name X, etc)

1 Like

Sounds like with our current stand alone implementation we don’t need to worry about this.

That was also a great summary of the variable usage and is great info for if/when we switch to Mender hosted. It does feel like that variable is a bit misnamed for how it is used which led to my confusion.

As always, thanks for the quick and through reply!