All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>
To: "Richard Purdie" <richard.purdie@linuxfoundation.org>,
	<bitbake-devel@lists.openembedded.org>
Cc: "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
Subject: Re: [bitbake-devel] [PATCH RFC 2/3] build: Attach a log catcher to tasks and save their records
Date: Fri, 30 Oct 2026 16:56:21 +0100	[thread overview]
Message-ID: <DMIANO837A8R.PC0CY8WUO45E@bootlin.com> (raw)
In-Reply-To: <1f4c6cf178dd2b78c6e970c5f46817da8838e13b.camel@linuxfoundation.org>

On Sun Oct 25, 2026 at 3:15 PM CET, Richard Purdie wrote:
> On Sat, 2026-10-24 at 14:33 +0200, Mathieu Dubois-Briand via lists.openembedded.org wrote:
>> Every task gets a LogCatcher which records its warnings and errors during
>> execution. Right after the task body, and before the postfuncs, the
>> records are written to ${T}/logrecords.<task>.json. The sstate packaging
>> postfunc reads the current task's file to bundle the messages for replay
>> when the task is later restored from the sstate cache.
>> 
>> Writing the file before the postfuncs makes both the current task's own
>> record and the files of already finished dependency tasks readable from
>> the same place.
>> 
>> AI-Generated: Uses opencode (DeepSeek V4 Flash)
>> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
>> ---

...

>> @@ -711,6 +720,9 @@ def _exec_task(fn, task, d, quieterr):
>>              for func in (prefuncs or '').split():
>>                  exec_func(func, localdata)
>>              exec_func(task, localdata)
>> +            if tasklogcatcher.records:
>> +                with open(logrecords, 'w') as f:
>> +                    json.dump(tasklogcatcher.records, f)
>>              for func in (postfuncs or '').split():
>>                  exec_func(func, localdata)
>
> I was going to ask if this should unconditionally rewrite the file even
> if there are no records, else messages might persist if you fix
> warnings output for example? I then see you delete the file above.
>
> If there is no log output, I guess the question is whether we should
> write an empty file or not...
>

I had no strong opinion here, but based on your comment, I feel like we
should indeed write an empty file when there is no log.

Thanks,
Mathieu

-- 
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


  reply	other threads:[~2026-10-30 15:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-24 12:33 [PATCH RFC 0/3] Preparatory work for sstate cache log replay Mathieu Dubois-Briand
2026-10-24 12:33 ` [PATCH RFC 1/3] utils: Extend LogCatcher to record raw messages and levels Mathieu Dubois-Briand
2026-10-24 12:33 ` [PATCH RFC 2/3] build: Attach a log catcher to tasks and save their records Mathieu Dubois-Briand
2026-10-25 14:15   ` [bitbake-devel] " Richard Purdie
2026-10-30 15:56     ` Mathieu Dubois-Briand [this message]
2026-10-24 12:33 ` [PATCH RFC 3/3] runqueue: Hand each covered task's log to a single setscene task Mathieu Dubois-Briand
2026-10-25 14:20   ` [bitbake-devel] " Richard Purdie
2026-10-30 15:54     ` Mathieu Dubois-Briand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DMIANO837A8R.PC0CY8WUO45E@bootlin.com \
    --to=mathieu.dubois-briand@bootlin.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.