On Fri, Aug 11, 2023 at 12:47 AM, Ross Burton wrote:

> 
> On 11 Aug 2023, at 03:21, Jiliang Cai via lists.yoctoproject.org
> <tyrocjl=gmail....@lists.yoctoproject.org> wrote:
> 
>> I have a recipe abc_1.0.bb. It generates a txt contains all layers git
>> commit
>> ID into /etc. It is installed into image by IMAGE_INSTALL:append = " abc".
> 
> 
> If you want a list of layers/SHAs in your image, look at the
> image-buildinfo class.

*I use this bbclass, but it sometimes records inaccurate SHAs.*
For example, when I first bitbake based a dirty layer meta-aaa, the SHA works
as expected, followed by a 'modified'. But when I submitted the meta-aaa
modification and ran bitbake again, nothing happened, and the file /etc/build
was not regenerated.
*Although meta-aaa is already clean at this time, the old SHA and 'modified' 
are*
*still displayed in the rootfs build file.
*
Is there any good way to solve this problem ?

> 
> 
>> I want to rebuild abc every time I execute bitbake <image>. So I set
>> nostamp to
>> 1 in abc_1.0.bb.
>> 
>> It served my purpose. When I execute bitbake core-image-minimal, abc_1.0
>> is
>> always rebuilt, even if it was built last time without any changes.
>> 
>> But, it leads to re-do_rootfs every time, and repackages images in formats
>> such
>> as tar.
>> 
>> I expect that when the txt generated by abc_1.0 has not changed, do_rootfs
>> 
>> should not be re-executed, what should I do?
> 
> Of course it does: you explicitly told bitbake that this recipe _must_ be
> re-run and doesn’t have stamps to identify if it can be reused or not. Use
> the image-buildinfo class.

I set nostamp to 1 in abc_1.0.bb, also to solve the problem similar to the
above image-buildinfo.bbclass. But this introduces a new problem: it sometimes
leads to unnecessary execution of tasks such as do_rootfs.

*Is there any good way to solve this problem ?*

> 
> Ross
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#60786): https://lists.yoctoproject.org/g/yocto/message/60786
Mute This Topic: https://lists.yoctoproject.org/mt/100677035/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to