mbox

[0/1] sstate bug fix

Message ID 20220127201845.19319-1-henning.schild@siemens.com
State Superseded, archived
Headers show

Message

Henning Schild Jan. 27, 2022, 10:18 a.m. UTC
This is just a single patch but i think it fixes bugs and should be
considered before a release ... i usually do not do cover letters for
single patches. So here i still do it to point out that it might be
important.

Henning Schild (1):
  sttate: change rootfs task to cache

 meta/classes/rootfs.bbclass | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

Comments

Henning Schild Jan. 27, 2022, 8:39 p.m. UTC | #1
Some more testing reveals that buildchroot_install_files does not work
with that. The reason seams to be that files to be installed did not
get fetched when using the cache.

Will have to see how to deal with that. Stay tuned for a v2 and please
not that sstate still has bugs. But those might just be OK to enter a
release, that is up to the maintainer to decide.

regards,
Henning

Am Thu, 27 Jan 2022 21:18:44 +0100
schrieb Henning Schild <henning.schild@siemens.com>:

> This is just a single patch but i think it fixes bugs and should be
> considered before a release ... i usually do not do cover letters for
> single patches. So here i still do it to point out that it might be
> important.
> 
> Henning Schild (1):
>   sttate: change rootfs task to cache
> 
>  meta/classes/rootfs.bbclass | 25 ++++++++++++-------------
>  1 file changed, 12 insertions(+), 13 deletions(-)
>
Schmidt, Adriaan Jan. 28, 2022, 6:24 a.m. UTC | #2
Schild, Henning (T CED SES-DE), 27. Januar 2022 21:40:
> 
> Some more testing reveals that buildchroot_install_files does not work
> with that. The reason seams to be that files to be installed did not
> get fetched when using the cache.

An easy fix would be to add a dependency in buildchroot:
addtask rootfs_install after do_fetch

Or turn those files into a package so they get installed in rootfs_install
instead of "installing" stuff during "postprocess".

Adriaan

> Will have to see how to deal with that. Stay tuned for a v2 and please
> not that sstate still has bugs. But those might just be OK to enter a
> release, that is up to the maintainer to decide.
> 
> regards,
> Henning
> 
> Am Thu, 27 Jan 2022 21:18:44 +0100
> schrieb Henning Schild <henning.schild@siemens.com>:
> 
> > This is just a single patch but i think it fixes bugs and should be
> > considered before a release ... i usually do not do cover letters for
> > single patches. So here i still do it to point out that it might be
> > important.
> >
> > Henning Schild (1):
> >   sttate: change rootfs task to cache
> >
> >  meta/classes/rootfs.bbclass | 25 ++++++++++++-------------
> >  1 file changed, 12 insertions(+), 13 deletions(-)
> >
Henning Schild Jan. 28, 2022, 7:15 a.m. UTC | #3
Am Fri, 28 Jan 2022 07:24:50 +0100
schrieb "Schmidt, Adriaan (T CED SES-DE)" <adriaan.schmidt@siemens.com>:

> Schild, Henning (T CED SES-DE), 27. Januar 2022 21:40:
> > 
> > Some more testing reveals that buildchroot_install_files does not
> > work with that. The reason seams to be that files to be installed
> > did not get fetched when using the cache.  
> 
> An easy fix would be to add a dependency in buildchroot:
> addtask rootfs_install after do_fetch

I will try that. Looking at the code we might well have the same
problem with sdkchroot_install_files, hopefully the fetch dep fixes
both.

> Or turn those files into a package so they get installed in
> rootfs_install instead of "installing" stuff during "postprocess".

Yes both these postprocess functions violate an essential isar rule.
"everything inside rootfs should come from a package"

I think for the stuff from sdkchroot_install_files we can do that
easily and i will add a TODO for that. For buildchroot_install_files it
might be trickier, if we wanted that to be a package we would need to
build it "native" since we do not yet have a buildchroot.

Henning

> Adriaan
> 
> > Will have to see how to deal with that. Stay tuned for a v2 and
> > please not that sstate still has bugs. But those might just be OK
> > to enter a release, that is up to the maintainer to decide.
> > 
> > regards,
> > Henning
> > 
> > Am Thu, 27 Jan 2022 21:18:44 +0100
> > schrieb Henning Schild <henning.schild@siemens.com>:
> >   
> > > This is just a single patch but i think it fixes bugs and should
> > > be considered before a release ... i usually do not do cover
> > > letters for single patches. So here i still do it to point out
> > > that it might be important.
> > >
> > > Henning Schild (1):
> > >   sttate: change rootfs task to cache
> > >
> > >  meta/classes/rootfs.bbclass | 25 ++++++++++++-------------
> > >  1 file changed, 12 insertions(+), 13 deletions(-)
> > >  
>
Henning Schild Jan. 28, 2022, 7:24 a.m. UTC | #4
Am Fri, 28 Jan 2022 07:24:50 +0100
schrieb "Schmidt, Adriaan (T CED SES-DE)" <adriaan.schmidt@siemens.com>:

> Schild, Henning (T CED SES-DE), 27. Januar 2022 21:40:
> > 
> > Some more testing reveals that buildchroot_install_files does not
> > work with that. The reason seams to be that files to be installed
> > did not get fetched when using the cache.  
> 
> An easy fix would be to add a dependency in buildchroot:
> addtask rootfs_install after do_fetch

In fact we already have it "after do_unpack". I kind of need a way to
say that do_rootfs_postprocess depends on fetch/unpack being actually
done, even if rootfs_install was found in the cache.

Henning

> Or turn those files into a package so they get installed in
> rootfs_install instead of "installing" stuff during "postprocess".
> 
> Adriaan
> 
> > Will have to see how to deal with that. Stay tuned for a v2 and
> > please not that sstate still has bugs. But those might just be OK
> > to enter a release, that is up to the maintainer to decide.
> > 
> > regards,
> > Henning
> > 
> > Am Thu, 27 Jan 2022 21:18:44 +0100
> > schrieb Henning Schild <henning.schild@siemens.com>:
> >   
> > > This is just a single patch but i think it fixes bugs and should
> > > be considered before a release ... i usually do not do cover
> > > letters for single patches. So here i still do it to point out
> > > that it might be important.
> > >
> > > Henning Schild (1):
> > >   sttate: change rootfs task to cache
> > >
> > >  meta/classes/rootfs.bbclass | 25 ++++++++++++-------------
> > >  1 file changed, 12 insertions(+), 13 deletions(-)
> > >  
>
Schmidt, Adriaan Jan. 28, 2022, 7:33 a.m. UTC | #5
Schild, Henning (T CED SES-DE), 28. Januar 2022 08:15
> Am Fri, 28 Jan 2022 07:24:50 +0100
> schrieb "Schmidt, Adriaan (T CED SES-DE)" <adriaan.schmidt@siemens.com>:
> 
> > Schild, Henning (T CED SES-DE), 27. Januar 2022 21:40:
> > >
> > > Some more testing reveals that buildchroot_install_files does not
> > > work with that. The reason seams to be that files to be installed
> > > did not get fetched when using the cache.
> >
> > An easy fix would be to add a dependency in buildchroot:
> > addtask rootfs_install after do_fetch
> 
> I will try that. Looking at the code we might well have the same
> problem with sdkchroot_install_files, hopefully the fetch dep fixes
> both.

Hopefully, running do_fetch will not trigger the complete task chain.
If all goes well, it will produce an unchanged sstate signature and
not see any need to go through do_patch..do_rootfs_install.
But that's something to look out for.

> > Or turn those files into a package so they get installed in
> > rootfs_install instead of "installing" stuff during "postprocess".
> 
> Yes both these postprocess functions violate an essential isar rule.
> "everything inside rootfs should come from a package"
> 
> I think for the stuff from sdkchroot_install_files we can do that
> easily and i will add a TODO for that. For buildchroot_install_files it
> might be trickier, if we wanted that to be a package we would need to
> build it "native" since we do not yet have a buildchroot.

For the SDK case, that's one of the things happening in the proposed
"[PATCH v3 2/3] image: refactor SDK".

Adriaan

> 
> Henning
> 
> > Adriaan
> >
> > > Will have to see how to deal with that. Stay tuned for a v2 and
> > > please not that sstate still has bugs. But those might just be OK
> > > to enter a release, that is up to the maintainer to decide.
> > >
> > > regards,
> > > Henning
> > >
> > > Am Thu, 27 Jan 2022 21:18:44 +0100
> > > schrieb Henning Schild <henning.schild@siemens.com>:
> > >
> > > > This is just a single patch but i think it fixes bugs and should
> > > > be considered before a release ... i usually do not do cover
> > > > letters for single patches. So here i still do it to point out
> > > > that it might be important.
> > > >
> > > > Henning Schild (1):
> > > >   sttate: change rootfs task to cache
> > > >
> > > >  meta/classes/rootfs.bbclass | 25 ++++++++++++-------------
> > > >  1 file changed, 12 insertions(+), 13 deletions(-)
> > > >
> >
Schmidt, Adriaan Jan. 28, 2022, 7:38 a.m. UTC | #6
Schild, Henning (T CED SES-DE), 28. Januar 2022 08:24:
> Am Fri, 28 Jan 2022 07:24:50 +0100
> schrieb "Schmidt, Adriaan (T CED SES-DE)" <adriaan.schmidt@siemens.com>:
> 
> > Schild, Henning (T CED SES-DE), 27. Januar 2022 21:40:
> > >
> > > Some more testing reveals that buildchroot_install_files does not
> > > work with that. The reason seams to be that files to be installed
> > > did not get fetched when using the cache.
> >
> > An easy fix would be to add a dependency in buildchroot:
> > addtask rootfs_install after do_fetch
> 
> In fact we already have it "after do_unpack". I kind of need a way to
> say that do_rootfs_postprocess depends on fetch/unpack being actually
> done, even if rootfs_install was found in the cache.

I was wrong in my original comment. We probably need:
addtask rootfs_postprocess after do_unpack

Adriaan

> Henning
> 
> > Or turn those files into a package so they get installed in
> > rootfs_install instead of "installing" stuff during "postprocess".
> >
> > Adriaan
> >
> > > Will have to see how to deal with that. Stay tuned for a v2 and
> > > please not that sstate still has bugs. But those might just be OK
> > > to enter a release, that is up to the maintainer to decide.
> > >
> > > regards,
> > > Henning
> > >
> > > Am Thu, 27 Jan 2022 21:18:44 +0100
> > > schrieb Henning Schild <henning.schild@siemens.com>:
> > >
> > > > This is just a single patch but i think it fixes bugs and should
> > > > be considered before a release ... i usually do not do cover
> > > > letters for single patches. So here i still do it to point out
> > > > that it might be important.
> > > >
> > > > Henning Schild (1):
> > > >   sttate: change rootfs task to cache
> > > >
> > > >  meta/classes/rootfs.bbclass | 25 ++++++++++++-------------
> > > >  1 file changed, 12 insertions(+), 13 deletions(-)
> > > >
> >
Henning Schild Jan. 28, 2022, 8:08 a.m. UTC | #7
Am Fri, 28 Jan 2022 08:38:17 +0100
schrieb "Schmidt, Adriaan (T CED SES-DE)" <adriaan.schmidt@siemens.com>:

> Schild, Henning (T CED SES-DE), 28. Januar 2022 08:24:
> > Am Fri, 28 Jan 2022 07:24:50 +0100
> > schrieb "Schmidt, Adriaan (T CED SES-DE)"
> > <adriaan.schmidt@siemens.com>: 
> > > Schild, Henning (T CED SES-DE), 27. Januar 2022 21:40:  
> > > >
> > > > Some more testing reveals that buildchroot_install_files does
> > > > not work with that. The reason seams to be that files to be
> > > > installed did not get fetched when using the cache.  
> > >
> > > An easy fix would be to add a dependency in buildchroot:
> > > addtask rootfs_install after do_fetch  
> > 
> > In fact we already have it "after do_unpack". I kind of need a way
> > to say that do_rootfs_postprocess depends on fetch/unpack being
> > actually done, even if rootfs_install was found in the cache.  
> 
> I was wrong in my original comment. We probably need:
> addtask rootfs_postprocess after do_unpack

Yes, that is what i came up with as well. Seems to work.

Henning

> Adriaan
> 
> > Henning
> >   
> > > Or turn those files into a package so they get installed in
> > > rootfs_install instead of "installing" stuff during "postprocess".
> > >
> > > Adriaan
> > >  
> > > > Will have to see how to deal with that. Stay tuned for a v2 and
> > > > please not that sstate still has bugs. But those might just be
> > > > OK to enter a release, that is up to the maintainer to decide.
> > > >
> > > > regards,
> > > > Henning
> > > >
> > > > Am Thu, 27 Jan 2022 21:18:44 +0100
> > > > schrieb Henning Schild <henning.schild@siemens.com>:
> > > >  
> > > > > This is just a single patch but i think it fixes bugs and
> > > > > should be considered before a release ... i usually do not do
> > > > > cover letters for single patches. So here i still do it to
> > > > > point out that it might be important.
> > > > >
> > > > > Henning Schild (1):
> > > > >   sttate: change rootfs task to cache
> > > > >
> > > > >  meta/classes/rootfs.bbclass | 25 ++++++++++++-------------
> > > > >  1 file changed, 12 insertions(+), 13 deletions(-)
> > > > >  
> > >  
>
Henning Schild Jan. 28, 2022, 8:09 a.m. UTC | #8
Am Fri, 28 Jan 2022 08:33:01 +0100
schrieb "Schmidt, Adriaan (T CED SES-DE)" <adriaan.schmidt@siemens.com>:

> Schild, Henning (T CED SES-DE), 28. Januar 2022 08:15
> > Am Fri, 28 Jan 2022 07:24:50 +0100
> > schrieb "Schmidt, Adriaan (T CED SES-DE)"
> > <adriaan.schmidt@siemens.com>: 
> > > Schild, Henning (T CED SES-DE), 27. Januar 2022 21:40:  
> > > >
> > > > Some more testing reveals that buildchroot_install_files does
> > > > not work with that. The reason seams to be that files to be
> > > > installed did not get fetched when using the cache.  
> > >
> > > An easy fix would be to add a dependency in buildchroot:
> > > addtask rootfs_install after do_fetch  
> > 
> > I will try that. Looking at the code we might well have the same
> > problem with sdkchroot_install_files, hopefully the fetch dep fixes
> > both.  
> 
> Hopefully, running do_fetch will not trigger the complete task chain.
> If all goes well, it will produce an unchanged sstate signature and
> not see any need to go through do_patch..do_rootfs_install.
> But that's something to look out for.
> 
> > > Or turn those files into a package so they get installed in
> > > rootfs_install instead of "installing" stuff during
> > > "postprocess".  
> > 
> > Yes both these postprocess functions violate an essential isar rule.
> > "everything inside rootfs should come from a package"
> > 
> > I think for the stuff from sdkchroot_install_files we can do that
> > easily and i will add a TODO for that. For
> > buildchroot_install_files it might be trickier, if we wanted that
> > to be a package we would need to build it "native" since we do not
> > yet have a buildchroot.  
> 
> For the SDK case, that's one of the things happening in the proposed
> "[PATCH v3 2/3] image: refactor SDK".

Cool! I will not even add the TODO in that case.

Henning

> Adriaan
> 
> > 
> > Henning
> >   
> > > Adriaan
> > >  
> > > > Will have to see how to deal with that. Stay tuned for a v2 and
> > > > please not that sstate still has bugs. But those might just be
> > > > OK to enter a release, that is up to the maintainer to decide.
> > > >
> > > > regards,
> > > > Henning
> > > >
> > > > Am Thu, 27 Jan 2022 21:18:44 +0100
> > > > schrieb Henning Schild <henning.schild@siemens.com>:
> > > >  
> > > > > This is just a single patch but i think it fixes bugs and
> > > > > should be considered before a release ... i usually do not do
> > > > > cover letters for single patches. So here i still do it to
> > > > > point out that it might be important.
> > > > >
> > > > > Henning Schild (1):
> > > > >   sttate: change rootfs task to cache
> > > > >
> > > > >  meta/classes/rootfs.bbclass | 25 ++++++++++++-------------
> > > > >  1 file changed, 12 insertions(+), 13 deletions(-)
> > > > >  
> > >  
>
Henning Schild Jan. 28, 2022, 9:01 a.m. UTC | #9
Am Fri, 28 Jan 2022 08:33:01 +0100
schrieb "Schmidt, Adriaan (T CED SES-DE)" <adriaan.schmidt@siemens.com>:

> Schild, Henning (T CED SES-DE), 28. Januar 2022 08:15
> > Am Fri, 28 Jan 2022 07:24:50 +0100
> > schrieb "Schmidt, Adriaan (T CED SES-DE)"
> > <adriaan.schmidt@siemens.com>: 
> > > Schild, Henning (T CED SES-DE), 27. Januar 2022 21:40:  
> > > >
> > > > Some more testing reveals that buildchroot_install_files does
> > > > not work with that. The reason seams to be that files to be
> > > > installed did not get fetched when using the cache.  
> > >
> > > An easy fix would be to add a dependency in buildchroot:
> > > addtask rootfs_install after do_fetch  
> > 
> > I will try that. Looking at the code we might well have the same
> > problem with sdkchroot_install_files, hopefully the fetch dep fixes
> > both.  
> 
> Hopefully, running do_fetch will not trigger the complete task chain.
> If all goes well, it will produce an unchanged sstate signature and
> not see any need to go through do_patch..do_rootfs_install.
> But that's something to look out for.

I checked and it will not trigger rootfs_install again.

Henning

> > > Or turn those files into a package so they get installed in
> > > rootfs_install instead of "installing" stuff during
> > > "postprocess".  
> > 
> > Yes both these postprocess functions violate an essential isar rule.
> > "everything inside rootfs should come from a package"
> > 
> > I think for the stuff from sdkchroot_install_files we can do that
> > easily and i will add a TODO for that. For
> > buildchroot_install_files it might be trickier, if we wanted that
> > to be a package we would need to build it "native" since we do not
> > yet have a buildchroot.  
> 
> For the SDK case, that's one of the things happening in the proposed
> "[PATCH v3 2/3] image: refactor SDK".
> 
> Adriaan
> 
> > 
> > Henning
> >   
> > > Adriaan
> > >  
> > > > Will have to see how to deal with that. Stay tuned for a v2 and
> > > > please not that sstate still has bugs. But those might just be
> > > > OK to enter a release, that is up to the maintainer to decide.
> > > >
> > > > regards,
> > > > Henning
> > > >
> > > > Am Thu, 27 Jan 2022 21:18:44 +0100
> > > > schrieb Henning Schild <henning.schild@siemens.com>:
> > > >  
> > > > > This is just a single patch but i think it fixes bugs and
> > > > > should be considered before a release ... i usually do not do
> > > > > cover letters for single patches. So here i still do it to
> > > > > point out that it might be important.
> > > > >
> > > > > Henning Schild (1):
> > > > >   sttate: change rootfs task to cache
> > > > >
> > > > >  meta/classes/rootfs.bbclass | 25 ++++++++++++-------------
> > > > >  1 file changed, 12 insertions(+), 13 deletions(-)
> > > > >  
> > >  
>
Baurzhan Ismagulov Feb. 14, 2022, 9:28 a.m. UTC | #10
On Thu, Jan 27, 2022 at 09:18:44PM +0100, Henning Schild wrote:
> This is just a single patch but i think it fixes bugs and should be
> considered before a release ... i usually do not do cover letters for
> single patches. So here i still do it to point out that it might be
> important.

Oops, we've concentrated too much on our original patch list to include in the
release and overlooked this one... We'll review and test the latest version.

We'll consider process changes for a more balanced procedure and migrate our
internal patchwork to a public server.

With kind regards,
Baurzhan.