Then you should look at something like ROOTFS_POSTPROCESS_COMMAND,
which runs an extensible set of functions after the rootfs for a
target image has been formed through package install in do_rootfs.

Alex

On Mon, 30 May 2022 at 14:31, Cardenas Jose Antonio (JCARDENA)
<joseantonio.carde...@niko.eu> wrote:
>
> I can't. The file that i'm trying to modify is a configuration file of a 
> service that is built with its recipe and in my "optional" recipe what i'm 
> trying to do is change a parameter of that configuration file.
>
> -----Mensaje original-----
> De: Alexander Kanavin <alex.kana...@gmail.com>
> Enviado el: lunes, 30 de mayo de 2022 13:59
> Para: Cardenas Jose Antonio (JCARDENA) <joseantonio.carde...@niko.eu>
> CC: yocto@lists.yoctoproject.org
> 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.
>
> I'd say it's better to modify the original recipe, can you do that?
>
> Alex
>
> On Mon, 30 May 2022 at 13:39, Cardenas Jose Antonio (JCARDENA) 
> <joseantonio.carde...@niko.eu> 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?
> >
> > Regards.
> >
> > -----Mensaje original-----
> > De: Alexander Kanavin <alex.kana...@gmail.com> Enviado el: lunes, 30
> > de mayo de 2022 13:29
> > Para: Cardenas Jose Antonio (JCARDENA) <joseantonio.carde...@niko.eu>
> > CC: yocto@lists.yoctoproject.org
> > 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?
> >
> > Alex
> >
> > On Mon, 30 May 2022 at 13:23, Cardenas Jose Antonio (JCARDENA) 
> > <joseantonio.carde...@niko.eu> 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?
> > >
> > >
> > >
> > > Regards.
> > >
> > > Jose
> > >
> > >
> > > 
> > >
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#57216): https://lists.yoctoproject.org/g/yocto/message/57216
Mute This Topic: https://lists.yoctoproject.org/mt/91428591/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to