# Mender-artifact Incorrect Usage: flag provided but not defined: -f

**URL:** https://hub.mender.io/t/mender-artifact-incorrect-usage-flag-provided-but-not-defined-f/495
**Category:** General Discussions
**Created:** [April 24, 2019, 6:32am UTC](https://hub.mender.io/t/mender-artifact-incorrect-usage-flag-provided-but-not-defined-f/495 "2019-04-24T06:32:36Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)
#### Post date: [April 24, 2019, 6:32am UTC](https://hub.mender.io/t/mender-artifact-incorrect-usage-flag-provided-but-not-defined-f/495/1 "2019-04-24T06:32:36Z")

</div>

Hi,

I’m building mender for x86 platform (yocto thud branch and hit yesterday this error):

```auto
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_image_mender
| + [-z x86_23_04_2019_19_39]
| + stat -Lc %s /home/gitlab-runner/builds/d9570b5d/0/marek.belisko/test/.build-x86/tmp/work/intel_corei7_64-poky-linux/core-image-minimal-initramfs/1.0-r0/deploy-core-image-minimal-initramfs-image-complete/core-image-minimal-initramfs-intel-corei7-64.ext4
| + rootfs_size=37577728
| + expr 1024000 * 1024
| + calc_rootfs_size=1048576000
| + [37577728 -gt 1048576000]
| + [-z intel-corei7-64]
| + extra_args=
| + extra_args= -t intel-corei7-64
| + [-n]
| + [-d /home/gitlab-runner/builds/d9570b5d/0/marek.belisko/test/.build-x86/tmp/deploy/images/intel-corei7-64/mender-state-scripts]
| + image_flag=-f
| + mender-artifact write rootfs-image -n x86_23_04_2019_19_39 -t intel-corei7-64 -f /home/gitlab-runner/builds/d9570b5d/0/marek.belisko/test/.build-x86/tmp/work/intel_corei7_64-poky-linux/core-image-minimal-initramfs/1.0-r0/deploy-core-image-minimal-initramfs-image-complete/core-image-minimal-initramfs-intel-corei7-64.ext4 -o /home/gitlab-runner/builds/d9570b5d/0/marek.belisko/test/.build-x86/tmp/work/intel_corei7_64-poky-linux/core-image-minimal-initramfs/1.0-r0/deploy-core-image-minimal-initramfs-image-complete/core-image-minimal-initramfs-intel-corei7-64--20190423194106.mender
| Incorrect Usage: flag provided but not defined: -f
| 
| NAME:
| mender-artifact write rootfs-image - Writes Mender artifact containing rootfs image
| 
| USAGE:
| mender-artifact write rootfs-image [command options] <image path>
| 
| OPTIONS:
| --update FILE, -u FILE Update FILE.
| --device-type value, -t value Type of device(s) supported by the update. You can specify multiple compatible devices providing this parameter multiple times.
| --artifact-name value, -n value Name of the artifact
| --output-path value, -o value Full path to output artifact file.
| --version value, -v value Version of the artifact. (default: 2)
| --key value, -k value Full path to the private key that will be used to sign the artifact.
| --script value, -s value Full path to the state script(s). You can specify multiple scripts providing this parameter multiple times.
| 
| + bb_exit_handler
| + ret=1

```

from code it looks like that mender\_version\_is\_minimum thinks that mender-artifact is \< 3.0.0 and then use wrong flag. Ideas? Thanks.

---

<div class="post-metadata">

### Author: ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)
#### Post date: [April 24, 2019, 7:18am UTC](https://hub.mender.io/t/mender-artifact-incorrect-usage-flag-provided-but-not-defined-f/495/2 "2019-04-24T07:18:06Z")

</div>

Sorry about that. This was accidentally introduced yesterday. I have put up a fix for review here: [https://github.com/mendersoftware/meta-mender/pull/717](https://github.com/mendersoftware/meta-mender/pull/717)

---

<div class="post-metadata">

### Author: ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)
#### Post date: [April 24, 2019, 7:28am UTC](https://hub.mender.io/t/mender-artifact-incorrect-usage-flag-provided-but-not-defined-f/495/3 "2019-04-24T07:28:53Z")

</div>

@kacf thanks for info. I’ve reverted to thud-2019.03 and lets see if it build ;). Thanks for info.

---

<div class="post-metadata">

### Author: ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)
#### Post date: [April 24, 2019, 9:27am UTC](https://hub.mender.io/t/mender-artifact-incorrect-usage-flag-provided-but-not-defined-f/495/4 "2019-04-24T09:27:11Z")

</div>

Just for my info. Why arguments was changed? Cannot be keep for backward compatibility? Thx.

---

<div class="post-metadata">

### Author: ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)
#### Post date: [April 24, 2019, 9:58am UTC](https://hub.mender.io/t/mender-artifact-incorrect-usage-flag-provided-but-not-defined-f/495/5 "2019-04-24T09:58:48Z")

</div>

The argument was changed because the ‘-u’ letter makes no sense anymore  
when considering update modules. Previously it meant “update”, but now  
it can be any file, a header, a manifest, a script, anything. So we  
changed it to ‘-f’ for “file”.

Of course for classic rootfs artifacts it still means “update”, but we  
wanted to use the same arguments everywhere.

---

<div class="post-metadata">

### Author: ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)
#### Post date: [April 24, 2019, 12:26pm UTC](https://hub.mender.io/t/mender-artifact-incorrect-usage-flag-provided-but-not-defined-f/495/6 "2019-04-24T12:26:44Z")

</div>

This should be fixed now.
