# Usage of \`MENDER\_ARTIFACT\_NAME\` bitbake variable

**URL:** <https://hub.mender.io/t/usage-of-mender-artifact-name-bitbake-variable/1221>\
**Category:** General Discussions\
**Created:** [November 6, 2019, 5:55pm UTC](https://hub.mender.io/t/usage-of-mender-artifact-name-bitbake-variable/1221 "2019-11-06T17:55:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcampbellizo](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mcampbellizo/32/395_2.png) [@mcampbellizo](https://hub.mender.io/u/mcampbellizo)\
**Post date:** [November 6, 2019, 5:55pm UTC](https://hub.mender.io/t/usage-of-mender-artifact-name-bitbake-variable/1221/1 "2019-11-06T17:55:35Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [November 6, 2019, 6:04pm UTC](https://hub.mender.io/t/usage-of-mender-artifact-name-bitbake-variable/1221/2 "2019-11-06T18:04:50Z")

</div>

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

> [@Howto: MENDER\_ARTIFACT\_NAME automatic setup for yocto build](https://hub.mender.io/t/howto-mender-artifact-name-automatic-setup-for-yocto-build/468):
>
> There was already discussion about setting automatics ARTIFACT\_NAME in old google forum just want to share how I did it (maybe someone will find it handy). Basically I’ve setup in local.conf MENDER\_ARTIFACT\_NAME ?= "release-1" this variable have weak preference so our set with environment will be used (if we don’t use one in env default release-1 will be used). Then in build script I set: export MENDER\_ARTIFACT\_NAME="$version" export BB\_ENV\_EXTRAWHITE="$BB\_ENV\_EXTRAWHITE MENDER\_ARTIFACT\_NAM…

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)

---

<div class="post-metadata">

**Author:** ![mcampbellizo](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mcampbellizo/32/395_2.png) [@mcampbellizo](https://hub.mender.io/u/mcampbellizo)\
**Post date:** [November 6, 2019, 8:38pm UTC](https://hub.mender.io/t/usage-of-mender-artifact-name-bitbake-variable/1221/3 "2019-11-06T20:38:20Z")

</div>

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!
