0

No matter what I do, I cannot get a postinst script to execute. I have a foobar-image.bb with:

require recipes-core/images/core-image-base.bb

# Add foobar-tools
IMAGE_INSTALL_append += "\
    foobar-tools \
"

pkg_postinst_ontarget_${PN} () {
    /bin/touch /home/root/marker_file
}

But marker_file is nowhere to be found. I have have tried

  • pkg_postinst and pkg_postinst_ontarget (using $D if executed on the host)
  • with and without _${PN}
  • with and without _append but nothing seems to do anything.

I believe the recipe is baked correctly because if I add another IMAGE_INSTALL_append to it, it is added to the image.

I do not use a validated host distribution (ubuntu-22.04). So, although this may be causing it, I cannot change this easily. I would like to know if there may be something else that may be causing this.

Daniel
  • 1
  • 1

0 Answers0