public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Felix Moessbauer <felix.moessbauer@siemens.com>
To: isar-users@googlegroups.com
Cc: henning.schild@siemens.com, jan.kiszka@siemens.com,
	Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH v3 3/3] display sub-task progress in wic-image
Date: Mon, 27 Sep 2021 15:14:08 +0200	[thread overview]
Message-ID: <20210927131408.1161317-4-felix.moessbauer@siemens.com> (raw)
In-Reply-To: <20210927131408.1161317-1-felix.moessbauer@siemens.com>

Displaying the sub-process helps to discover locking / dead-lock
issues as is exposes which task got the lock (the one with more progess).

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/classes/wic-img.bbclass | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass
index 9df40a9..caad1b1 100644
--- a/meta/classes/wic-img.bbclass
+++ b/meta/classes/wic-img.bbclass
@@ -138,9 +138,14 @@ python check_for_wic_warnings() {
 
 do_wic_image[file-checksums] += "${WKS_FILE_CHECKSUM}"
 python do_wic_image() {
-    bb.build.exec_func("wic_do_mounts", d)
-    bb.build.exec_func("generate_wic_image", d)
-    bb.build.exec_func("check_for_wic_warnings", d)
+    cmds = ['wic_do_mounts', 'generate_wic_image', 'check_for_wic_warnings']
+    weights = [5, 90, 5]
+    progress_reporter = bb.progress.MultiStageProgressReporter(d, weights)
+
+    for cmd in cmds:
+        progress_reporter.next_stage()
+        bb.build.exec_func(cmd, d)
+    progress_reporter.finish()
 }
 addtask wic_image before do_image after do_image_tools
 
-- 
2.30.2


  parent reply	other threads:[~2021-09-27 13:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27 13:14 [PATCH v3 0/3] Fix sporadic failures in do_wic_image Felix Moessbauer
2021-09-27 13:14 ` [PATCH v3 1/3] fix typo in do_rootfs_finalize Felix Moessbauer
2021-09-27 13:14 ` [PATCH v3 2/3] do not unmount wic mounts to avoid over-locking Felix Moessbauer
2021-09-27 13:14 ` Felix Moessbauer [this message]
2021-10-15  6:55 ` [PATCH v3 0/3] Fix sporadic failures in do_wic_image Anton Mikanovich

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=20210927131408.1161317-4-felix.moessbauer@siemens.com \
    --to=felix.moessbauer@siemens.com \
    --cc=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.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