# Mender-artifact missing global options support in mender-artifactimg.bbclass

**URL:** https://hub.mender.io/t/mender-artifact-missing-global-options-support-in-mender-artifactimg-bbclass/1333
**Category:** General Discussions
**Created:** [December 6, 2019, 6:36pm UTC](https://hub.mender.io/t/mender-artifact-missing-global-options-support-in-mender-artifactimg-bbclass/1333 "2019-12-06T18:36:55Z")
**Posts on this page:** 3
**Page:** 1

<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: [December 6, 2019, 6:36pm UTC](https://hub.mender.io/t/mender-artifact-missing-global-options-support-in-mender-artifactimg-bbclass/1333/1 "2019-12-06T18:36:55Z")

</div>

In [https://raw.githubusercontent.com/mendersoftware/meta-mender/master/meta-mender-core/classes/mender-artifactimg.bbclass](https://raw.githubusercontent.com/mendersoftware/meta-mender/master/meta-mender-core/classes/mender-artifactimg.bbclass)

There doesn’t seem to be any provision to set mender-artifact global options like compression. MENDER\_ARTIFACT\_EXTRA\_ARGS adds command args and cannot be used for global options. Should we provide a MENDER\_ARTIFACT\_GLOBAL\_ARGS variable to support change of compression in yocto builds.

For example:

from this:

```
mender-artifact write rootfs-image \
    -n ${MENDER_ARTIFACT_NAME} \
    $extra_args \
    $image_flag ${IMGDEPLOYDIR}/${ARTIFACTIMG_NAME}.${ARTIFACTIMG_FSTYPE} \
    ${MENDER_ARTIFACT_EXTRA_ARGS} \
    -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.mender

```

to

```
mender-artifact ${MENDER_ARTIFACT_GLOBAL_ARGS} write rootfs-image \
    -n ${MENDER_ARTIFACT_NAME} \
    $extra_args \
    $image_flag ${IMGDEPLOYDIR}/${ARTIFACTIMG_NAME}.${ARTIFACTIMG_FSTYPE} \
    ${MENDER_ARTIFACT_EXTRA_ARGS} \
    -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.mender
```

---

<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: [December 7, 2019, 11:40pm UTC](https://hub.mender.io/t/mender-artifact-missing-global-options-support-in-mender-artifactimg-bbclass/1333/2 "2019-12-07T23:40:54Z")

</div>

[https://tracker.mender.io/browse/MEN-2970](https://tracker.mender.io/browse/MEN-2970)

---

<div class="post-metadata">

### Author: ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)
#### Post date: [December 9, 2019, 2:03am UTC](https://hub.mender.io/t/mender-artifact-missing-global-options-support-in-mender-artifactimg-bbclass/1333/3 "2019-12-09T02:03:25Z")

</div>

I don’t see any issues with adding this. In fact i quite like it.

Still, not me making the final decision, so simply

👍

from me.
