Non-artifact state scripts are not getting deployed


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

(in tegra-state-scripts_%.bbappend)

    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

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.

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?

Just to be sure, try

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


$ 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.

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.

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