# Non-artifact state scripts are not getting deployed

**URL:** <https://hub.mender.io/t/non-artifact-state-scripts-are-not-getting-deployed/2261>\
**Category:** General Discussions\
**Tags:** yocto, tegra, tx2\
**Created:** [July 30, 2020, 9:47am UTC](https://hub.mender.io/t/non-artifact-state-scripts-are-not-getting-deployed/2261 "2020-07-30T09:47:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![genericname](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/genericname/32/708_2.png) [@genericname](https://hub.mender.io/u/genericname)\
**Post date:** [July 30, 2020, 9:47am UTC](https://hub.mender.io/t/non-artifact-state-scripts-are-not-getting-deployed/2261/1 "2020-07-30T09:47:21Z")

</div>

Hello,

I have a tegra tx2 device running yocto (3.0.3) and mender (2.2). I use the mender-community layer.  
The tegra-state-script.bb recipe is successfully appended by

(in tegra-state-scripts\_%.bbappend)

```auto
    FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

     SRC_URI += "file://foo \
                file://bar \
                file://newStuff \
                "
      
     do_compile_tegra186_append() {
         cp ${WORKDIR}/foo ${MENDER_STATE_SCRIPTS_DIR}/ArtifactInstall_Enter_05
         cp ${WORKDIR}/bar ${MENDER_STATE_SCRIPTS_DIR}/ArtifactInstall_Leave_05
         cp ${WORKDIR}/newStuff ${MENDER_STATE_SCRIPTS_DIR}/Download_Enter_85
    }

```

The two Artifact\* scripts get properly installed and work.  
Q: Why can’t i integrate a Download\* script like i do it with Artifact\* scripts?

No error is thrown while building an artifact with the Download\* script. It’s just that i expected that script to end up on my device under /etc/mender/scripts \<- this folder exists and contains the `version` file

---

<div class="post-metadata">

**Author:** ![madisox](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/madisox/32/446_2.png) [@madisox](https://hub.mender.io/u/madisox)\
**Post date:** [July 30, 2020, 11:39am UTC](https://hub.mender.io/t/non-artifact-state-scripts-are-not-getting-deployed/2261/2 "2020-07-30T11:39:22Z")

</div>

I do something similar in my distro and it works fine for me. Nothing jumps out at me when looking at your bbappend, but start by verifying that it actually took effect:

1. Check the `image/etc/mender/scripts` directory in the recipe working tree (under `$BUILDDIR/tmp/work/...`). If the files don’t show up there, then you need to figure out why your bbappend didn’t get applied.
2. If the files _are_ there in step 1, next step is to look at the `rootfs/etc/mender/scripts` directory for your image build to see if they got installed there. If not, you need to check on why the `tegra-state-scripts` package isn’t being installed into the image.

If you see the files in both 1 and 2 above, but you still don’t see the files on the target after you install the built image, then I’m not sure what to try next, other than to verify that you actually installed that image and not some other one by mistake.

---

<div class="post-metadata">

**Author:** ![genericname](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/genericname/32/708_2.png) [@genericname](https://hub.mender.io/u/genericname)\
**Post date:** [July 30, 2020, 12:17pm UTC](https://hub.mender.io/t/non-artifact-state-scripts-are-not-getting-deployed/2261/3 "2020-07-30T12:17:25Z")

</div>

I can not find my state script `Download_Enter_85` in `$BUILDDIR/tmp/work/...` , or anywhere else.

The bbappend seems to get applied because i can find the two Artifact\* scripts in `$BUILDDIR/tmp/deploy/images/jetson-tx2/mender-state-scripts/`. Or is that a wrong conclusion?

---

<div class="post-metadata">

**Author:** ![madisox](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/madisox/32/446_2.png) [@madisox](https://hub.mender.io/u/madisox)\
**Post date:** [July 30, 2020, 1:25pm UTC](https://hub.mender.io/t/non-artifact-state-scripts-are-not-getting-deployed/2261/4 "2020-07-30T13:25:35Z")

</div>

Just to be sure, try

```
$ bitbake -c clean -c cleansstate tegra-state-scripts

```

then

```
$ bitbake -v -c install tegra-state-scripts

```

The `-v` will give you more verbose output, including echo all of the shell script commands that get executed, so you can see if your Download script is getting installed or not.

---

<div class="post-metadata">

**Author:** ![genericname](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/genericname/32/708_2.png) [@genericname](https://hub.mender.io/u/genericname)\
**Post date:** [July 30, 2020, 1:41pm UTC](https://hub.mender.io/t/non-artifact-state-scripts-are-not-getting-deployed/2261/5 "2020-07-30T13:41:38Z")

</div>

I have now added `tegra-state-scripts` to my `.inc` file and _voila_ also my non-artifact state scripts are in `$BUILDDIR/tmp/work/` and get deployed. So that works now.

But i still don’t know why this recipe works for Artifact\* scripts even without putting it into my `.inc`.

Thanks @madisox, i will keep that `-v` option in mind for my next debugging session.

---

<div class="post-metadata">

**Author:** ![SLIP76](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@SLIP76](https://hub.mender.io/u/SLIP76)\
**Post date:** [November 11, 2021, 1:57pm UTC](https://hub.mender.io/t/non-artifact-state-scripts-are-not-getting-deployed/2261/6 "2021-11-11T13:57:57Z")

</div>

> [@genericname](#):
>
> .inc

Would you be so kind to point me to that file(s)? I have similar issue - non-artifact script is not present
