From 87b99274e9c90101ec9d4c49ce0874bcb85f7746 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Wed, 11 Jun 2014 15:33:17 +0100 Subject: [PATCH] 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 Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/views.py | 7 +++---- 1 file 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): b.completeper = tf.exclude(order__isnull=True).count()*100/tf.count() else: b.completeper = 0 - b.eta = timezone.now() + + b.eta = 0 if b.completeper > 0: - b.eta += ((timezone.now() - b.started_on)*100/b.completeper) - else: - b.eta = 0 + b.eta = timezone.now() + ((timezone.now() - b.started_on)*(100-b.completeper)/b.completeper) # set up list of fstypes for each build fstypes_map = {};