* [PATCH 1/2] knotty/uihelper: Show setscene task progress in summary output
@ 2021-10-07 12:55 Richard Purdie
2021-10-07 12:55 ` [PATCH 2/2] bitbake-worker: Handle pseudo shutdown in Ctrl+C case Richard Purdie
2021-10-08 12:48 ` [bitbake-devel] [PATCH 1/2] knotty/uihelper: Show setscene task progress in summary output Michael Opdenacker
0 siblings, 2 replies; 3+ messages in thread
From: Richard Purdie @ 2021-10-07 12:55 UTC (permalink / raw)
To: bitbake-devel
With the changes to task accounting, bitbake doesn't show progress
when executing setscene tasks on the summary console output.
Change to show a progress within the setscene tasks and a progress
within the main tasks. I can't see any way to display this more easily
without confusing users.
[YOCTO #14586]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
lib/bb/ui/knotty.py | 6 +++---
lib/bb/ui/uihelper.py | 4 +++-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py
index 8df745d130..484545a684 100644
--- a/lib/bb/ui/knotty.py
+++ b/lib/bb/ui/knotty.py
@@ -276,11 +276,11 @@ class TerminalFilter(object):
print(content)
else:
if self.quiet:
- content = "Running tasks (%s of %s)" % (self.helper.tasknumber_current, self.helper.tasknumber_total)
+ content = "Running tasks (%s of %s/%s of %s)" % (self.helper.setscene_current, self.helper.setscene_total, self.helper.tasknumber_current, self.helper.tasknumber_total)
elif not len(activetasks):
- content = "No currently running tasks (%s of %s)" % (self.helper.tasknumber_current, self.helper.tasknumber_total)
+ content = "No currently running tasks (%s of %s/%s of %s)" % (self.helper.setscene_current, self.helper.setscene_total, self.helper.tasknumber_current, self.helper.tasknumber_total)
else:
- content = "Currently %2s running tasks (%s of %s)" % (len(activetasks), self.helper.tasknumber_current, self.helper.tasknumber_total)
+ content = "Currently %2s running tasks (%s of %s/%s of %s)" % (len(activetasks), self.helper.setscene_current, self.helper.setscene_total, self.helper.tasknumber_current, self.helper.tasknumber_total)
maxtask = self.helper.tasknumber_total
if not self.main_progress or self.main_progress.maxval != maxtask:
widgets = [' ', progressbar.Percentage(), ' ', progressbar.Bar()]
diff --git a/lib/bb/ui/uihelper.py b/lib/bb/ui/uihelper.py
index 52fdae3fec..82913e0da8 100644
--- a/lib/bb/ui/uihelper.py
+++ b/lib/bb/ui/uihelper.py
@@ -50,8 +50,10 @@ class BBUIHelper:
removetid(event.pid, tid)
self.failed_tasks.append( { 'title' : "%s %s" % (event._package, event._task)})
elif isinstance(event, bb.runqueue.runQueueTaskStarted) or isinstance(event, bb.runqueue.sceneQueueTaskStarted):
- self.tasknumber_current = event.stats.completed + event.stats.active + event.stats.failed + event.stats.setscene_active + 1
+ self.tasknumber_current = event.stats.completed + event.stats.active + event.stats.failed
self.tasknumber_total = event.stats.total
+ self.setscene_current = event.stats.setscene_active + event.stats.setscene_covered + event.stats.setscene_notcovered
+ self.setscene_total = event.stats.setscene_total
self.needUpdate = True
elif isinstance(event, bb.build.TaskProgress):
if event.pid > 0 and event.pid in self.pidmap:
--
2.32.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] bitbake-worker: Handle pseudo shutdown in Ctrl+C case
2021-10-07 12:55 [PATCH 1/2] knotty/uihelper: Show setscene task progress in summary output Richard Purdie
@ 2021-10-07 12:55 ` Richard Purdie
2021-10-08 12:48 ` [bitbake-devel] [PATCH 1/2] knotty/uihelper: Show setscene task progress in summary output Michael Opdenacker
1 sibling, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2021-10-07 12:55 UTC (permalink / raw)
To: bitbake-devel
If the build is interrupted, handle the shutdown of pseudo even in this
case to avoid data corruption inside docker containers.
[YOCTO #14555]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
bin/bitbake-worker | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/bin/bitbake-worker b/bin/bitbake-worker
index 115bc1d091..6a12e1fed2 100755
--- a/bin/bitbake-worker
+++ b/bin/bitbake-worker
@@ -287,10 +287,12 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, taskha
try:
if dry_run:
return 0
- ret = bb.build.exec_task(fn, taskname, the_data, cfg.profile)
- if fakeroot:
- fakerootcmd = shlex.split(the_data.getVar("FAKEROOTCMD"))
- subprocess.run(fakerootcmd + ['-S'], check=True, stdout=subprocess.PIPE)
+ try:
+ ret = bb.build.exec_task(fn, taskname, the_data, cfg.profile)
+ finally:
+ if fakeroot:
+ fakerootcmd = shlex.split(the_data.getVar("FAKEROOTCMD"))
+ subprocess.run(fakerootcmd + ['-S'], check=True, stdout=subprocess.PIPE)
return ret
except:
os._exit(1)
--
2.32.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [bitbake-devel] [PATCH 1/2] knotty/uihelper: Show setscene task progress in summary output
2021-10-07 12:55 [PATCH 1/2] knotty/uihelper: Show setscene task progress in summary output Richard Purdie
2021-10-07 12:55 ` [PATCH 2/2] bitbake-worker: Handle pseudo shutdown in Ctrl+C case Richard Purdie
@ 2021-10-08 12:48 ` Michael Opdenacker
1 sibling, 0 replies; 3+ messages in thread
From: Michael Opdenacker @ 2021-10-08 12:48 UTC (permalink / raw)
To: Richard Purdie, bitbake-devel
Hi Richard,
On 10/7/21 2:55 PM, Richard Purdie wrote:
> With the changes to task accounting, bitbake doesn't show progress
> when executing setscene tasks on the summary console output.
>
> Change to show a progress within the setscene tasks and a progress
> within the main tasks. I can't see any way to display this more easily
> without confusing users.
>
> [YOCTO #14586]
Tested-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
This looks like a good solution. We clearly see what's going on.
Thanks!
Michael.
--
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-08 12:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-07 12:55 [PATCH 1/2] knotty/uihelper: Show setscene task progress in summary output Richard Purdie
2021-10-07 12:55 ` [PATCH 2/2] bitbake-worker: Handle pseudo shutdown in Ctrl+C case Richard Purdie
2021-10-08 12:48 ` [bitbake-devel] [PATCH 1/2] knotty/uihelper: Show setscene task progress in summary output Michael Opdenacker
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.