Hi there!
I’m using swupdate with Yocto, and I’m encountering an issue where I’m trying to modify my pre-install.sh file prior to it being packaged in the .swu file. I have my own image recipe that inherits swupdate-image, and I’ve tried the following to run a sed command on the following appends/prepends in my recipe:
do_fetch
do_unpack
do_rootfs
do_swupdate_copy_swdescription
do_swuimage
Furthermore, I also tried patching swupdate-image directly, with the sed command happening in do_unpack, but that didn’t work either. In most cases, the file would either be replaced just in the WORKDIR, or it would be replaced in WORKDIR/PN, but seemingly after the .swu was made. Is there a known way to update files that will be in sw-description/the package?
My bbpatch file for the recipe I’m using, in essence:
FILESEXTRAPATHS:prepend := "${THISDIR}/files:" SRC_URI:append = " \ file://sw-description \ file://pre-install.sh \ file://post-install.sh \ " inherit swupdate-image do_rootfs:append() { // custom stuff } do_install:prepend() { echo "TARGET_ENVIRONMENT = \"${TARGET_ENVIRONMENT}\"" sed -i 's/@@TARGET_ENVIRONMENT@@/${TARGET_ENVIRONMENT}/g' ${D}/pre-install.sh }Hopefully this is the correct place to ask about this - it feels like swupdate is doing something behind the scenes that I’m not quite grasping, perhaps caching the file elsewhere that I haven’t tried accessing/modifying.
Thanks for your time,
Liz