diff mbox series

[4/6] gnu-config: add a do_compile task

Message ID 20231208101522.198832-4-alex@linutronix.de
State New
Headers show
Series [1/6] selftest/sstatetest: print output from bitbake with actual newlines, not \n | expand

Commit Message

Alexander Kanavin Dec. 8, 2023, 10:15 a.m. UTC
noexec flag has an unfortunate side effect of not writing out the .siginfo
file into sstate (because that is done in sstate bbclass
from a task-completed event handler).

In the absence of the siginfo file, diffsigs code is unable to trace back
the change in task signatures if the change is really basic and
affects tasks coming ahead of gnu-config-native:do_compile.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 meta/recipes-devtools/gnu-config/gnu-config_git.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Richard Purdie Dec. 8, 2023, 11:34 a.m. UTC | #1
On Fri, 2023-12-08 at 11:15 +0100, Alexander Kanavin wrote:
> noexec flag has an unfortunate side effect of not writing out the .siginfo
> file into sstate (because that is done in sstate bbclass
> from a task-completed event handler).
> 
> In the absence of the siginfo file, diffsigs code is unable to trace back
> the change in task signatures if the change is really basic and
> affects tasks coming ahead of gnu-config-native:do_compile.
> 
> Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> ---
>  meta/recipes-devtools/gnu-config/gnu-config_git.bb | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-devtools/gnu-config/gnu-config_git.bb b/meta/recipes-devtools/gnu-config/gnu-config_git.bb
> index 718f798a00e..c72de159ce2 100644
> --- a/meta/recipes-devtools/gnu-config/gnu-config_git.bb
> +++ b/meta/recipes-devtools/gnu-config/gnu-config_git.bb
> @@ -19,7 +19,8 @@ UPSTREAM_CHECK_COMMITS = "1"
>  
>  CLEANBROKEN = "1"
>  
> -do_compile[noexec] = "1"
> +do_compile () {
> +}
>  
>  do_install () {
>  	install -d ${D}${datadir}/gnu-config \
> 

You have a good point here but by this logic, we need to remove *all*
noexec tasks. We don't really want to do that and I'm not sure we want
to set this precedent.

I wonder if we could just remove the compile task entirely and what
that would break...

Cheers,

Richard
Peter Kjellerstedt Dec. 8, 2023, 11:46 p.m. UTC | #2
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Richard Purdie
> Sent: den 8 december 2023 12:35
> To: Alexander Kanavin <alex.kanavin@gmail.com>; openembedded-core@lists.openembedded.org
> Cc: Alexander Kanavin <alex@linutronix.de>
> Subject: Re: [OE-core] [PATCH 4/6] gnu-config: add a do_compile task
> 
> On Fri, 2023-12-08 at 11:15 +0100, Alexander Kanavin wrote:
> > noexec flag has an unfortunate side effect of not writing out the .siginfo
> > file into sstate (because that is done in sstate bbclass
> > from a task-completed event handler).
> >
> > In the absence of the siginfo file, diffsigs code is unable to trace back
> > the change in task signatures if the change is really basic and
> > affects tasks coming ahead of gnu-config-native:do_compile.
> >
> > Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> > ---
> >  meta/recipes-devtools/gnu-config/gnu-config_git.bb | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/meta/recipes-devtools/gnu-config/gnu-config_git.bb b/meta/recipes-devtools/gnu-config/gnu-config_git.bb
> > index 718f798a00e..c72de159ce2 100644
> > --- a/meta/recipes-devtools/gnu-config/gnu-config_git.bb
> > +++ b/meta/recipes-devtools/gnu-config/gnu-config_git.bb
> > @@ -19,7 +19,8 @@ UPSTREAM_CHECK_COMMITS = "1"
> >
> >  CLEANBROKEN = "1"
> >
> > -do_compile[noexec] = "1"
> > +do_compile () {
> > +}
> >
> >  do_install () {
> >  	install -d ${D}${datadir}/gnu-config \
> >
> 
> You have a good point here but by this logic, we need to remove *all*
> noexec tasks. We don't really want to do that and I'm not sure we want
> to set this precedent.
> 
> I wonder if we could just remove the compile task entirely and what
> that would break...
> 
> Cheers,
> 
> Richard

Would it be possible to change the code so that the .siginfo files are 
still produced for noexec tasks? Otherwise it seems using noexec tasks 
is a real blocker for being able to trace the signatures for any 
subsequent task.

//Peter
Richard Purdie Dec. 9, 2023, 12:14 a.m. UTC | #3
On Fri, 2023-12-08 at 23:46 +0000, Peter Kjellerstedt wrote:
> > -----Original Message-----
> > From: openembedded-core@lists.openembedded.org
> > <openembedded-core@lists.openembedded.org> On Behalf Of Richard
> > Purdie
> > Sent: den 8 december 2023 12:35
> > To: Alexander Kanavin <alex.kanavin@gmail.com>;
> > openembedded-core@lists.openembedded.org
> > Cc: Alexander Kanavin <alex@linutronix.de>
> > Subject: Re: [OE-core] [PATCH 4/6] gnu-config: add a do_compile
> > task
> > 
> > On Fri, 2023-12-08 at 11:15 +0100, Alexander Kanavin wrote:
> > > noexec flag has an unfortunate side effect of not writing out the
> > > .siginfo
> > > file into sstate (because that is done in sstate bbclass
> > > from a task-completed event handler).
> > > 
> > > In the absence of the siginfo file, diffsigs code is unable to
> > > trace back
> > > the change in task signatures if the change is really basic and
> > > affects tasks coming ahead of gnu-config-native:do_compile.
> > > 
> > > Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> > > ---
> > >  meta/recipes-devtools/gnu-config/gnu-config_git.bb | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/meta/recipes-devtools/gnu-config/gnu-config_git.bb
> > > b/meta/recipes-devtools/gnu-config/gnu-config_git.bb
> > > index 718f798a00e..c72de159ce2 100644
> > > --- a/meta/recipes-devtools/gnu-config/gnu-config_git.bb
> > > +++ b/meta/recipes-devtools/gnu-config/gnu-config_git.bb
> > > @@ -19,7 +19,8 @@ UPSTREAM_CHECK_COMMITS = "1"
> > > 
> > >  CLEANBROKEN = "1"
> > > 
> > > -do_compile[noexec] = "1"
> > > +do_compile () {
> > > +}
> > > 
> > >  do_install () {
> > >  	install -d ${D}${datadir}/gnu-config \
> > > 
> > 
> > You have a good point here but by this logic, we need to remove
> > *all*
> > noexec tasks. We don't really want to do that and I'm not sure we
> > want
> > to set this precedent.
> > 
> > I wonder if we could just remove the compile task entirely and what
> > that would break...
> > 
> > Cheers,
> > 
> > Richard
> 
> Would it be possible to change the code so that the .siginfo files
> are 
> still produced for noexec tasks? Otherwise it seems using noexec
> tasks 
> is a real blocker for being able to trace the signatures for any 
> subsequent task.

Producing the siginfo files requires a full data store and bitbake
doesn't retain that information for every recipe, just a summary of the
data it needs. It is therefore currently produced in the task execution
context currently. With a noexec task, the win is that we never need
that context.

So this does need some thought.

Cheers,

Richard
diff mbox series

Patch

diff --git a/meta/recipes-devtools/gnu-config/gnu-config_git.bb b/meta/recipes-devtools/gnu-config/gnu-config_git.bb
index 718f798a00e..c72de159ce2 100644
--- a/meta/recipes-devtools/gnu-config/gnu-config_git.bb
+++ b/meta/recipes-devtools/gnu-config/gnu-config_git.bb
@@ -19,7 +19,8 @@  UPSTREAM_CHECK_COMMITS = "1"
 
 CLEANBROKEN = "1"
 
-do_compile[noexec] = "1"
+do_compile () {
+}
 
 do_install () {
 	install -d ${D}${datadir}/gnu-config \