# Yocto, new mender client, old artifact

**URL:** <https://hub.mender.io/t/yocto-new-mender-client-old-artifact/994>\
**Category:** General Discussions\
**Tags:** yocto\
**Created:** [September 9, 2019, 2:43pm UTC](https://hub.mender.io/t/yocto-new-mender-client-old-artifact/994 "2019-09-09T14:43:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mterwoord](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mterwoord/32/100_2.png) [@mterwoord](https://hub.mender.io/u/mterwoord)\
**Post date:** [September 9, 2019, 2:43pm UTC](https://hub.mender.io/t/yocto-new-mender-client-old-artifact/994/1 "2019-09-09T14:43:28Z")

</div>

Hi,

I’m using Yocto with Mender 2.0. Now I’m trying to get my image to be an artifact v2, but contain a client capable of doring v3 artifacts. How do i do that?

I can’t find anything about this…

With kind regards,  
Matthijs ter Woord

---

<div class="post-metadata">

**Author:** ![mterwoord](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mterwoord/32/100_2.png) [@mterwoord](https://hub.mender.io/u/mterwoord)\
**Post date:** [September 9, 2019, 2:52pm UTC](https://hub.mender.io/t/yocto-new-mender-client-old-artifact/994/2 "2019-09-09T14:52:42Z")

</div>

Just following up on my own post here…

I did find the PREFERRED\_VERSION\_pn-mender (and -artifact and -artifact-native) documentation, but am unable to get this working at all. Builds error.

---

<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:** [September 9, 2019, 3:46pm UTC](https://hub.mender.io/t/yocto-new-mender-client-old-artifact/994/3 "2019-09-09T15:46:33Z")

</div>

You can use `MENDER_ARTIFACT_EXTRA_ARGS` in the Yocto environment, e.g

```auto
PREFERRED_VERSION_pn-mender = "2.%"
PREFERRED_VERSION_pn-mender-artifact = "3.%"
PREFERRED_VERSION_pn-mender-artifact-native = "3.%"

MENDER_ARTIFACT_EXTRA_ARGS = "--version 2"

```

This will produce Mender Artifacts compatible with Artifact version 2, and will install the Mender 2.0 client.

---

<div class="post-metadata">

**Author:** ![mterwoord](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mterwoord/32/100_2.png) [@mterwoord](https://hub.mender.io/u/mterwoord)\
**Post date:** [September 10, 2019, 6:27pm UTC](https://hub.mender.io/t/yocto-new-mender-client-old-artifact/994/4 "2019-09-10T18:27:05Z")

</div>

Turns out,

```auto
PREFERRED_VERSION_pn-mender = "2.%"

```

has no effect.

---

<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:** [September 10, 2019, 6:50pm UTC](https://hub.mender.io/t/yocto-new-mender-client-old-artifact/994/5 "2019-09-10T18:50:25Z")

</div>

Please elaborate, I do not see any problems with that on my end.

If I set,

```auto
PREFERRED_VERSION_pn-mender = "2.%"

```

It builds the 2.0.0 client, if I remove above line it will build the 1.7 client.

---

<div class="post-metadata">

**Author:** ![mterwoord](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mterwoord/32/100_2.png) [@mterwoord](https://hub.mender.io/u/mterwoord)\
**Post date:** [September 11, 2019, 4:25pm UTC](https://hub.mender.io/t/yocto-new-mender-client-old-artifact/994/6 "2019-09-11T16:25:55Z")

</div>

Hi Mirza,

Sorry, I’m feeling stupid now. Somehow I had a bug in the snippet that has been there for a few months. The image is correct now. Now on to my next journey…

Thanks for holding up with me 🙂
