Re: How to modify an existing file from an optional recipe?

Alexander Kanavin

You can do this with a postinst scriptlet, or with an image post
processing task, but generally this looks like a hack regardless of
how you do it. What is the file for, and why does it need to be


On Mon, 30 May 2022 at 13:23, Cardenas Jose Antonio (JCARDENA)
<joseantonio.cardenas@...> wrote:

Hi all,

I have a recipe that is built only with the SDK that modifies the content of an existing file in the rootfs by doing “install -m 644 ${WORKDIR}/my_file ${D}${sysconfdir}/my_file” but this command is returning next error:

Error: Transaction check error:

file /etc/my_file between attempted installs of my_recipe-1.0-r0.7.armv7ahf_neon and initial_script-1.0-r155.1.armv7ahf_neon

I have seen that the best practice to modify an existing file is to create a .bbappend but this modification would be done for all builds, not only for the SDK. So what would be the best way to do this?



Join to automatically receive all group messages.