diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-06-23 22:59:08 +1200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-08 09:57:26 +0100 |
commit | 8d56d596bb2e48332e8f8c6aed78445f7ffb44bf (patch) | |
tree | 71fca3c860622183e43f7633db72a367113aff94 /bitbake/lib/bb/ui | |
parent | 0e3281f68b511ab7bf9d6b1c1f905ec794d3032a (diff) | |
download | poky-8d56d596bb2e48332e8f8c6aed78445f7ffb44bf.tar.gz |
bitbake: knotty: add code to support showing progress for sstate object querying
Add support code on the BitBake side to allow sstate.bbclass in
OpenEmbedded to report progress when it is checking for availability of
artifacts from shared state mirrors.
Part of the implementation for [YOCTO #5853].
(Bitbake rev: 070ae856da0715dbaf4c560c837ea796ffc29f00)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui')
-rw-r--r-- | bitbake/lib/bb/ui/knotty.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index 2513501500..6fdaafedb7 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py | |||
@@ -90,7 +90,7 @@ class NonInteractiveProgress(object): | |||
90 | self.msg = msg | 90 | self.msg = msg |
91 | self.maxval = maxval | 91 | self.maxval = maxval |
92 | 92 | ||
93 | def start(self): | 93 | def start(self, update=True): |
94 | self.fobj.write("%s..." % self.msg) | 94 | self.fobj.write("%s..." % self.msg) |
95 | self.fobj.flush() | 95 | self.fobj.flush() |
96 | return self | 96 | return self |
@@ -304,7 +304,7 @@ _evt_list = [ "bb.runqueue.runQueueExitWait", "bb.event.LogExecTTY", "logging.Lo | |||
304 | "bb.event.MultipleProviders", "bb.event.NoProvider", "bb.runqueue.sceneQueueTaskStarted", | 304 | "bb.event.MultipleProviders", "bb.event.NoProvider", "bb.runqueue.sceneQueueTaskStarted", |
305 | "bb.runqueue.runQueueTaskStarted", "bb.runqueue.runQueueTaskFailed", "bb.runqueue.sceneQueueTaskFailed", | 305 | "bb.runqueue.runQueueTaskStarted", "bb.runqueue.runQueueTaskFailed", "bb.runqueue.sceneQueueTaskFailed", |
306 | "bb.event.BuildBase", "bb.build.TaskStarted", "bb.build.TaskSucceeded", "bb.build.TaskFailedSilent", | 306 | "bb.event.BuildBase", "bb.build.TaskStarted", "bb.build.TaskSucceeded", "bb.build.TaskFailedSilent", |
307 | "bb.build.TaskProgress"] | 307 | "bb.build.TaskProgress", "bb.event.ProcessStarted", "bb.event.ProcessProgress", "bb.event.ProcessFinished"] |
308 | 308 | ||
309 | def main(server, eventHandler, params, tf = TerminalFilter): | 309 | def main(server, eventHandler, params, tf = TerminalFilter): |
310 | 310 | ||
@@ -579,6 +579,17 @@ def main(server, eventHandler, params, tf = TerminalFilter): | |||
579 | if isinstance(event, bb.event.DepTreeGenerated): | 579 | if isinstance(event, bb.event.DepTreeGenerated): |
580 | continue | 580 | continue |
581 | 581 | ||
582 | if isinstance(event, bb.event.ProcessStarted): | ||
583 | parseprogress = new_progress(event.processname, event.total) | ||
584 | parseprogress.start(False) | ||
585 | continue | ||
586 | if isinstance(event, bb.event.ProcessProgress): | ||
587 | parseprogress.update(event.progress) | ||
588 | continue | ||
589 | if isinstance(event, bb.event.ProcessFinished): | ||
590 | parseprogress.finish() | ||
591 | continue | ||
592 | |||
582 | # ignore | 593 | # ignore |
583 | if isinstance(event, (bb.event.BuildBase, | 594 | if isinstance(event, (bb.event.BuildBase, |
584 | bb.event.MetadataEvent, | 595 | bb.event.MetadataEvent, |