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

Alexander Kanavin

I'd say it's better to modify the original recipe, can you do that?


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

Yes, indeed. It's a hack to be able to run some tests. Does the "image post processing task" that you comment related with SDK_POSTPROCESS_COMMAND?


-----Mensaje original-----
De: Alexander Kanavin <alex.kanavin@...>
Enviado el: lunes, 30 de mayo de 2022 13:29
Para: Cardenas Jose Antonio (JCARDENA) <JoseAntonio.Cardenas@...>
CC: yocto@...
Asunto: Re: [yocto] How to modify an existing file from an optional recipe?

CAUTION: This email originated from outside the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.

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 replaced?


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

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.