diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2014-06-11 15:33:17 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-06-20 14:58:08 +0100 |
commit | 7a42bfecc25ecb27194b0d2dc78a3265977c45a2 (patch) | |
tree | 738d8081ec7a06dcecf124a1be1c78a4c1e0134e /bitbake | |
parent | 26db62e35951013515fba6b4ab92ac0ed6a80852 (diff) | |
download | poky-7a42bfecc25ecb27194b0d2dc78a3265977c45a2.tar.gz |
bitbake: toastergui: fix built ETA calculation
We fix the calculation showing the estimated time
to build completion.
(Bitbake rev: 5d85d1a7bbbce2c9baaa613c5cc84c511fb88376)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-x | bitbake/lib/toaster/toastergui/views.py | 7 |
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 = {}; |