siemens / meta-iot2050

SIMATIC IOT2050 Isar/Debian Board Support Package
MIT License
130 stars 77 forks source link

do_install debug #222

Closed MickaelDelanoe closed 2 years ago

MickaelDelanoe commented 2 years ago

Hello,

I want to add my Python application/code from my personal git repo, so I clone the repo and add a recipe into Isar. For this, I try to adapt my Yocto recipes to Isar.

So, I do the following recipe, where my file opwee.sh and folder python are well install

SUMMARY = "Main Aquassay IoT software"

SRC_URI += " \
    file://opwee.sh \
    file://opwee.cron \
    "

SRCREV = "87782cad64659b7.....2545a54f3ddfbaae6e"
SRC_URI += "git://git@git.aquassay.net/...;protocol=ssh"
LICENSE = "CLOSED"

DEBIAN_DEPENDS = "sqlite3, python, python-urllib3, python-aws-iot-device-sdk, python-botocore, python-s3transfer"

S = "${WORKDIR}/git"

inherit dpkg-raw

do_install () {
    install -v -d ${D}${sysconfdir}/profile.d/
    install -v -m 0755 ${WORKDIR}/opwee.sh ${D}${sysconfdir}/profile.d/

    install -v -d ${D}/opt/opwee
    cp -R ${S}/python ${D}/opt/opwee
}

But when I augment do_install instructions, nothing works, except the file opwee.sh that is well installed

do_install () {
    install -v -d ${D}${sysconfdir}/profile.d/
    install -v -m 0755 ${WORKDIR}/opwee.sh ${D}${sysconfdir}/profile.d/

    install -v -d ${D}${sysconfdir}/cron.d/
    install -v -m 0755 ${WORKDIR}/opwee.cron ${D}${sysconfdir}/cron.d/

    install -v -d ${D}/opt/opwee
    cp -R ${S}/python ${D}/opt/opwee
    chmod a+x ${D}/opt/opwee/python/opwee.py
    chmod a+x ${D}/opt/opwee/python/send-data.py

    # install -d ${D}/opt/opwee/debug
    cp -R ${S}/debug ${D}/opt/opwee
    cp -R ${S}/scripts ${D}/opt/opwee

    install -d ${D}/opt/opwee/files
    install -d ${D}/opt/opwee/logs
}

When I do my verification, I means I look into build/tmp/work/iot-2050-debian-arm64/iot2050-image-.../rootfs/

I asked myself if there is not a trouble who not show in build messages...

I have no WARNING, no ERROR in the build, do you think that my do_install is wrong ? Do you have an idea for debug ?

Best Regards,

MickaelDelanoe commented 2 years ago

In fact, I had a single layer (with only one bb file) who include two inc file from this layer.

.
├── Layer-A
│   ├── files/
│   ├── recip.bb (include recip-A, include recip-B)
│   └── recip-A.inc
│   └── recip-B.inc
.

I split this architecture by two distinct layer with the respective recipe in each.

.
├── Layer-A
│   ├── files/
│   └── recip-A.bb
├── Layer-B
│   ├── files/
│   └── recip-B.bb
.

And it seems better ...