summaryrefslogtreecommitdiffstats
path: root/lib/bb/ui
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-06-23 22:59:08 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-05 13:38:16 +0100
commit070ae856da0715dbaf4c560c837ea796ffc29f00 (patch)
tree8f6912b8b542c06a0e16cd72d17a284e088ef4ee /lib/bb/ui
parent751b75602872a89e8b1a7c03269bc0fdaa149c6f (diff)
downloadbitbake-contrib-070ae856da0715dbaf4c560c837ea796ffc29f00.tar.gz
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]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/ui')
-rw-r--r--lib/bb/ui/knotty.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py
index 251350150..6fdaafedb 100644
--- a/lib/bb/ui/knotty.py
+++ b/lib/bb/ui/knotty.py
@@ -90,7 +90,7 @@ class NonInteractiveProgress(object):
self.msg = msg
self.maxval = maxval
- def start(self):
+ def start(self, update=True):
self.fobj.write("%s..." % self.msg)
self.fobj.flush()
return self
@@ -304,7 +304,7 @@ _evt_list = [ "bb.runqueue.runQueueExitWait", "bb.event.LogExecTTY", "logging.Lo
"bb.event.MultipleProviders", "bb.event.NoProvider", "bb.runqueue.sceneQueueTaskStarted",
"bb.runqueue.runQueueTaskStarted", "bb.runqueue.runQueueTaskFailed", "bb.runqueue.sceneQueueTaskFailed",
"bb.event.BuildBase", "bb.build.TaskStarted", "bb.build.TaskSucceeded", "bb.build.TaskFailedSilent",
- "bb.build.TaskProgress"]
+ "bb.build.TaskProgress", "bb.event.ProcessStarted", "bb.event.ProcessProgress", "bb.event.ProcessFinished"]
def main(server, eventHandler, params, tf = TerminalFilter):
@@ -579,6 +579,17 @@ def main(server, eventHandler, params, tf = TerminalFilter):
if isinstance(event, bb.event.DepTreeGenerated):
continue
+ if isinstance(event, bb.event.ProcessStarted):
+ parseprogress = new_progress(event.processname, event.total)
+ parseprogress.start(False)
+ continue
+ if isinstance(event, bb.event.ProcessProgress):
+ parseprogress.update(event.progress)
+ continue
+ if isinstance(event, bb.event.ProcessFinished):
+ parseprogress.finish()
+ continue
+
# ignore
if isinstance(event, (bb.event.BuildBase,
bb.event.MetadataEvent,