From: Martin Jansa <martin.jansa@gmail.com>
To: Steve Sakoman <steve@sakoman.com>,
Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: bitbake-devel <bitbake-devel@lists.openembedded.org>
Subject: Re: [bitbake-devel] [bitbake][dunfell][1.46][PATCH 08/14] build: Avoid duplicating logs in verbose mode
Date: Thu, 30 Sep 2021 12:09:33 +0200 [thread overview]
Message-ID: <CA+chaQebhx9aX1sKGct-XTQdLm-dWvUZpGwpUDxv0fTUmj5iiQ@mail.gmail.com> (raw)
In-Reply-To: <e75169f7ef89cca94cefe9f0099a5b427b380a6d.1632493110.git.steve@sakoman.com>
[-- Attachment #1: Type: text/plain, Size: 3474 bytes --]
I'm sorry for late review, but this patch won't work in 1.46 without this
commit from 1.48:
commit 423c046f2173aaff3072dc3d0882d01b8a0b0212
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Mon Aug 24 12:28:27 2020 +0100
build/msg: Cleanup verbose option handling
which defines verboseStdoutLogging
Without this when task fails it shows completely wrong error output e.g.:
ERROR: sysdig-0.26.6-r0 do_compile: Build of do_compile failed
ERROR: sysdig-0.26.6-r0 do_compile: Traceback (most recent call last):
File "/jenkins/mjansa/build/webos/dunfell/bitbake/lib/bb/build.py", line
584, in _exec_task
exec_func(task, localdata)
File "/jenkins/mjansa/build/webos/dunfell/bitbake/lib/bb/build.py", line
251, in exec_func
exec_func_shell(func, d, runfile, cwd=adir)
File "/jenkins/mjansa/build/webos/dunfell/bitbake/lib/bb/build.py", line
452, in exec_func_shell
bb.process.run(cmd, shell=False, stdin=stdin, log=logfile,
extrafiles=[(fifo,readfifo)])
File "/jenkins/mjansa/build/webos/dunfell/bitbake/lib/bb/process.py",
line 184, in run
raise ExecutionError(cmd, pipe.returncode, None, None)
bb.process.ExecutionError: Execution of
'/jenkins/mjansa/build/webos/dunfell/BUILD/work/qemux86-webos-linux/sysdig/0.26.6-r0/temp/run.do_compile.69208'
failed with exit code 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/jenkins/mjansa/build/webos/dunfell/bitbake/lib/bb/build.py", line
649, in exec_task
return _exec_task(fn, task, d, quieterr)
File "/jenkins/mjansa/build/webos/dunfell/bitbake/lib/bb/build.py", line
597, in _exec_task
if verboseStdoutLogging:
NameError: name 'verboseStdoutLogging' is not defined
On Fri, Sep 24, 2021 at 4:22 PM Steve Sakoman <steve@sakoman.com> wrote:
> From: Richard Purdie <richard.purdie@linuxfoundation.org>
>
> With "bitbake -v", for task failures you'd see the log output twice. Avoid
> this by using the existing "did we print info" switch.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> (cherry picked from commit e2c1afda4cb8023ed4ffeb5dc5bee4f0055659a8)
> Signed-off-by: Steve Sakoman <steve@sakoman.com>
> ---
> lib/bb/build.py | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/lib/bb/build.py b/lib/bb/build.py
> index 04971636..6e9c064e 100644
> --- a/lib/bb/build.py
> +++ b/lib/bb/build.py
> @@ -592,6 +592,10 @@ def _exec_task(fn, task, d, quieterr):
> event.fire(TaskFailedSilent(task, fn, logfn, localdata),
> localdata)
> else:
> errprinted = errchk.triggered
> + # If the output is already on stdout, we've printed the
> information in the
> + # logs once already so don't duplicate
> + if verboseStdoutLogging:
> + errprinted = True
> logger.error(str(exc))
> event.fire(TaskFailed(task, fn, logfn, localdata,
> errprinted), localdata)
> return 1
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#12697):
> https://lists.openembedded.org/g/bitbake-devel/message/12697
> Mute This Topic: https://lists.openembedded.org/mt/85840116/3617156
> Group Owner: bitbake-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [
> Martin.Jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
[-- Attachment #2: Type: text/html, Size: 4989 bytes --]
next prev parent reply other threads:[~2021-09-30 10:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-24 14:20 [bitbake][dunfell][1.46][PATCH 00/14] Patch review Steve Sakoman
2021-09-24 14:20 ` [bitbake][dunfell][1.46][PATCH 01/14] server: Fix early parsing errors preventing zombie bitbake Steve Sakoman
2021-09-24 14:20 ` [bitbake][dunfell][1.46][PATCH 02/14] ui/taskexp: Improve startup exception handling Steve Sakoman
2021-09-24 14:20 ` [bitbake][dunfell][1.46][PATCH 03/14] ui/taskexp: Fix to work with empty build directories Steve Sakoman
2021-09-24 14:20 ` [bitbake][dunfell][1.46][PATCH 04/14] bitbake: bitbake-layers: add skip reason to output Steve Sakoman
2021-09-24 14:20 ` [bitbake][dunfell][1.46][PATCH 05/14] build: Match markup to real function name Steve Sakoman
2021-09-24 14:20 ` [bitbake][dunfell][1.46][PATCH 06/14] build: Handle SystemExit in python tasks correctly Steve Sakoman
2021-09-24 14:21 ` [bitbake][dunfell][1.46][PATCH 07/14] process: Don't include logs in error message if piping them Steve Sakoman
2021-09-24 14:21 ` [bitbake][dunfell][1.46][PATCH 08/14] build: Avoid duplicating logs in verbose mode Steve Sakoman
2021-09-30 10:09 ` Martin Jansa [this message]
2021-09-30 14:10 ` [bitbake-devel] " Steve Sakoman
2021-09-24 14:21 ` [bitbake][dunfell][1.46][PATCH 09/14] build: Catch and error upon circular task references Steve Sakoman
2021-09-24 14:21 ` [bitbake][dunfell][1.46][PATCH 10/14] data_smart: Improve error display for handled exceptions Steve Sakoman
2021-09-24 14:21 ` [bitbake][dunfell][1.46][PATCH 11/14] cookerdata: Improve missing core layer error message Steve Sakoman
2021-09-24 14:21 ` [bitbake][dunfell][1.46][PATCH 12/14] cookerdata: Show error for no BBLAYERS in bblayers.conf Steve Sakoman
2021-09-24 14:21 ` [bitbake][dunfell][1.46][PATCH 13/14] bitbake-worker: Improve error handling Steve Sakoman
2021-09-24 14:21 ` [bitbake][dunfell][1.46][PATCH 14/14] cookerdata: Show a readable error for invalid multiconfig name Steve Sakoman
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=CA+chaQebhx9aX1sKGct-XTQdLm-dWvUZpGwpUDxv0fTUmj5iiQ@mail.gmail.com \
--to=martin.jansa@gmail.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.org \
--cc=steve@sakoman.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).