# Mender-artifact cat mutates and damages artifact

**URL:** <https://hub.mender.io/t/mender-artifact-cat-mutates-and-damages-artifact/3286>\
**Category:** General Discussions\
**Tags:** mender-artifact\
**Created:** [March 2, 2021, 11:19am UTC](https://hub.mender.io/t/mender-artifact-cat-mutates-and-damages-artifact/3286 "2021-03-02T11:19:15Z")\
**Posts on this page:** 5\
**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:** [March 2, 2021, 11:19am UTC](https://hub.mender.io/t/mender-artifact-cat-mutates-and-damages-artifact/3286/1 "2021-03-02T11:19:15Z")

</div>

For several years now our CI servers have been validating the mender artifacts produced with various rules. Amongst those rules are some that use mender-artifact ‘cat’ to inspect certain things in the root-filesystem in the artifact before being deployed.

This week I have updated our mender-artifact version in the yocto build to 3.5.0 and we seem to of stumbled on a problem/bug/unintended behaviour/change in behaviour.

Previous when using mender-artifact 3.2.1 with ‘cat’ command this was a read-only inspection, but in 3.5.0 when i do a ‘cat’ on the mender artifact it mutates and breaks it, signature is gone, compression type is changed from lzma to gzip. Its as if its now getting unpacked and repackaged.

Is this is intended behaviour now?. The same thing happens if i use the ‘cp’ command to copy a file out of the artifact. The expectation for read only functionality like these is that the artifact being inspected shouldn’t be mutated.

This exists also with the latest checked out HEAD in master branch.

I can work around it for now by changing to make a copy of the artifact to inspect and then discard it.

---

<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:** [March 2, 2021, 12:04pm UTC](https://hub.mender.io/t/mender-artifact-cat-mutates-and-damages-artifact/3286/2 "2021-03-02T12:04:14Z")

</div>

This is definitely sounds like a bug to me!

Ticket [here](https://tracker.mender.io/browse/MEN-4502) 🙂

---

<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:** [March 2, 2021, 12:25pm UTC](https://hub.mender.io/t/mender-artifact-cat-mutates-and-damages-artifact/3286/3 "2021-03-02T12:25:57Z")

</div>

thank you 🙂

---

<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:** [March 18, 2021, 2:35pm UTC](https://hub.mender.io/t/mender-artifact-cat-mutates-and-damages-artifact/3286/4 "2021-03-18T14:35:38Z")

</div>

@dellgreen This should now be fixed in `master` 🙂

---

<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:** [March 18, 2021, 4:10pm UTC](https://hub.mender.io/t/mender-artifact-cat-mutates-and-damages-artifact/3286/5 "2021-03-18T16:10:19Z")

</div>

awesome thankyou 🙂
