From: Jan Kiszka <jan.kiszka@siemens.com>
To: Baurzhan Ismagulov <ibr@ilbers.de>
Cc: Harald Seiler <hws@denx.de>,
isar-users@googlegroups.com, Claudius Heine <ch@denx.de>
Subject: Re: [PATCH] rootfs: Report progress for postprocessing steps
Date: Tue, 13 Oct 2020 12:26:14 +0200 [thread overview]
Message-ID: <f022f6d0-f180-6484-a76d-ad05e51d01d1@siemens.com> (raw)
In-Reply-To: <20200701143832.1113534-1-hws@denx.de>
On 01.07.20 16:38, Harald Seiler wrote:
> Use a ProgressHandler to report how far postprocessing has progressed.
> Because we can't know the exact timing of all postprocessing tasks, the
> percentages are split evenly for all steps.
>
> Signed-off-by: Harald Seiler <hws@denx.de>
> ---
> meta/classes/rootfs.bbclass | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
> index 806e824c825a..889272e7bee4 100644
> --- a/meta/classes/rootfs.bbclass
> +++ b/meta/classes/rootfs.bbclass
> @@ -248,12 +248,16 @@ python do_rootfs_postprocess() {
> # removed on a previous execution of this task:
> bb.build.exec_func('rootfs_do_qemu', d)
>
> + progress_reporter = bb.progress.ProgressHandler(d)
> + progress_reporter.update(0)
> +
> cmds = d.getVar("ROOTFS_POSTPROCESS_COMMAND")
> if cmds is None or not cmds.strip():
> return
> cmds = cmds.split()
> - for cmd in cmds:
> + for i, cmd in enumerate(cmds):
> bb.build.exec_func(cmd, d)
> + progress_reporter.update(int(i / len(cmds) * 100))
> }
> addtask rootfs_postprocess before do_rootfs
>
>
Looks good to me, should be merged finally.
Jan
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2020-10-13 10:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-01 14:38 Harald Seiler
2020-07-01 16:33 ` Claudius Heine
2020-10-13 10:26 ` Jan Kiszka [this message]
2020-11-18 19:10 ` Baurzhan Ismagulov
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=f022f6d0-f180-6484-a76d-ad05e51d01d1@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=ch@denx.de \
--cc=hws@denx.de \
--cc=ibr@ilbers.de \
--cc=isar-users@googlegroups.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