poky: sumo refresh 45ef387cc5..51872d3f99

Update poky to sumo HEAD.

Awais Belal (8):
      bitbake: toaster: allow pokydirname to be evaluated when all layers are local
      bitbake: toaster: use a more flexible way to find bitbake
      bitbake: bitbake: toaster: allow TOASTER_DIR to be overridden from cmdline
      bitbake: toaster/widgets.py: avoid divide by zero issues
      bitbake: toastergui/newproject.html: fix release divs
      bitbake: toaster/checksettings: allow CUSTOM_XML_ONLY setting through env
      bitbake: toaster/models.py: allow local paths for custom recipe's base
      bitbake: toaster/layerdetails.js: don't hide local layer info

Karsten Strand (1):
      bitbake: bitbake: toaster: Fix comparison in recipe template

Change-Id: I8dbcad1d98ff8d3c660563781d887a2c91db5bf2
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/poky/bitbake/lib/toaster/toastergui/widgets.py b/poky/bitbake/lib/toaster/toastergui/widgets.py
index a1792d9..feef7c5 100644
--- a/poky/bitbake/lib/toaster/toastergui/widgets.py
+++ b/poky/bitbake/lib/toaster/toastergui/widgets.py
@@ -511,13 +511,18 @@
                 buildrequest_id = build_obj.buildrequest.pk
             build['buildrequest_id'] = buildrequest_id
 
-            build['recipes_parsed_percentage'] = \
-                int((build_obj.recipes_parsed /
-                     build_obj.recipes_to_parse) * 100)
-
-            build['repos_cloned_percentage'] = \
-                int((build_obj.repos_cloned /
-                     build_obj.repos_to_clone) * 100)
+            if build_obj.recipes_to_parse > 0:
+                build['recipes_parsed_percentage'] = \
+                    int((build_obj.recipes_parsed /
+                         build_obj.recipes_to_parse) * 100)
+            else:
+                build['recipes_parsed_percentage'] = 0
+            if build_obj.repos_to_clone > 0:
+                build['repos_cloned_percentage'] = \
+                    int((build_obj.repos_cloned /
+                         build_obj.repos_to_clone) * 100)
+            else:
+                build['repos_cloned_percentage'] = 0
 
             tasks_complete_percentage = 0
             if build_obj.outcome in (Build.SUCCEEDED, Build.FAILED):