summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-06-11 15:33:17 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-06-13 11:55:34 +0100
commit87b99274e9c90101ec9d4c49ce0874bcb85f7746 (patch)
tree25408130c6cdd020ba225441582d279d50783f9d /bitbake/lib
parent74cd8c38aa434ab825931f30b957d7b4bf871a9a (diff)
downloadpoky-87b99274e9c90101ec9d4c49ce0874bcb85f7746.tar.gz
bitbake: toastergui: fix built ETA calculation
We fix the calculation showing the estimated time to build completion. (Bitbake rev: dc1daae51ef5201475b5c1a69d966ae57b66dcb6) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rwxr-xr-xbitbake/lib/toaster/toastergui/views.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index 686cd5c8ce..b38d260d6f 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -230,11 +230,10 @@ def builds(request):
230 b.completeper = tf.exclude(order__isnull=True).count()*100/tf.count() 230 b.completeper = tf.exclude(order__isnull=True).count()*100/tf.count()
231 else: 231 else:
232 b.completeper = 0 232 b.completeper = 0
233 b.eta = timezone.now() 233
234 b.eta = 0
234 if b.completeper > 0: 235 if b.completeper > 0:
235 b.eta += ((timezone.now() - b.started_on)*100/b.completeper) 236 b.eta = timezone.now() + ((timezone.now() - b.started_on)*(100-b.completeper)/b.completeper)
236 else:
237 b.eta = 0
238 237
239 # set up list of fstypes for each build 238 # set up list of fstypes for each build
240 fstypes_map = {}; 239 fstypes_map = {};