# How to set mender artifact name to the yocto image name?

**URL:** <https://hub.mender.io/t/how-to-set-mender-artifact-name-to-the-yocto-image-name/3253>\
**Category:** Other\
**Created:** [February 21, 2021, 6:34pm UTC](https://hub.mender.io/t/how-to-set-mender-artifact-name-to-the-yocto-image-name/3253 "2021-02-21T18:34:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![KlausPopp](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/klauspopp/32/1065_2.png) [@KlausPopp](https://hub.mender.io/u/KlausPopp)\
**Post date:** [February 21, 2021, 6:34pm UTC](https://hub.mender.io/t/how-to-set-mender-artifact-name-to-the-yocto-image-name/3253/1 "2021-02-21T18:34:26Z")

</div>

For me, it would be natural to have the mender artifact name set to the same string as the image name generated in Yocto. Currently, I have to set MENDER\_ARTIFACT\_NAME manually in my local.conf file, which might not be consistent with the image name.  
Is there an easy way to achieve this?

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [February 21, 2021, 7:05pm UTC](https://hub.mender.io/t/how-to-set-mender-artifact-name-to-the-yocto-image-name/3253/2 "2021-02-21T19:05:41Z")

</div>

Try setting mender artifact name variable to:

`"${IMAGE_BASENAME}-${MACHINE}"`

---

<div class="post-metadata">

**Author:** ![KlausPopp](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/klauspopp/32/1065_2.png) [@KlausPopp](https://hub.mender.io/u/KlausPopp)\
**Post date:** [February 22, 2021, 2:00pm UTC](https://hub.mender.io/t/how-to-set-mender-artifact-name-to-the-yocto-image-name/3253/3 "2021-02-22T14:00:52Z")

</div>

Sorry, this does not work. When i set

`MENDER_ARTIFACT_NAME="${IMAGE_BASENAME}-${MACHINE}"`

in my local.conf (or the one generated by kas), I get

$ more moducop-cpu01/build/tmp/work/moducop\_cpu01-tdx-linux/ci4rail-bringup-image/1.0-r0/rootfs/etc/mender/artifact\_info  
artifact\_name=mender-artifact-info-moducop-cpu01

But the image base name should be Moducop-CPU01\_Bringup-Image\_CI.OS.LMP, not mender-artifact-info

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [February 22, 2021, 3:50pm UTC](https://hub.mender.io/t/how-to-set-mender-artifact-name-to-the-yocto-image-name/3253/4 "2021-02-22T15:50:38Z")

</div>

i assume your images are named correctly in your deploy images directory?

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [February 22, 2021, 4:00pm UTC](https://hub.mender.io/t/how-to-set-mender-artifact-name-to-the-yocto-image-name/3253/5 "2021-02-22T16:00:53Z")

</div>

the mender-artifact-info recipe is only expanding the MENDER\_ARTIFACT\_NAME variable, so maybe grep thru your layer/s/confs to see if anything else is setting the MENDER\_ARTIFACT\_NAME variable.

Also what version of yocto are you using?

Other than that try cleaning the mender-artifact-info recipe

> bitbake -c clean mender-artifact-info

> bitbake -c cleansstate mender-artifact-info
