1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 00:59:48 +00:00

bitbake: toaster: git clone progress bar

If a project has a lot of additional layers, the build may
appear to hang while those layers are checked out.
This patch adds a clone progress bar that is visible before
the parsing progress appears.

[YOCTO #9916]

(Bitbake rev: 0c94d947b74c4dee23d7b9d255facd3cf839ccbe)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
David Reyna
2017-06-27 13:44:29 -07:00
committed by Richard Purdie
parent d74bcbeaf2
commit 43aaa802c3
6 changed files with 98 additions and 1 deletions
@@ -85,6 +85,11 @@ class LocalhostBEController(BuildEnvironmentController):
return local_checkout_path
def setCloneStatus(self,bitbake,status,total,current):
bitbake.req.build.repos_cloned=current
bitbake.req.build.repos_to_clone=total
bitbake.req.build.save()
def setLayers(self, bitbake, layers, targets):
""" a word of attention: by convention, the first layer for any build will be poky! """
@@ -147,7 +152,13 @@ class LocalhostBEController(BuildEnvironmentController):
logger.info("Using pre-checked out source for layer %s", cached_layers)
# 3. checkout the repositories
clone_count=0
clone_total=len(gitrepos.keys())
self.setCloneStatus(bitbake,'Started',clone_total,clone_count)
for giturl, commit in gitrepos.keys():
self.setCloneStatus(bitbake,'progress',clone_total,clone_count)
clone_count += 1
localdirname = os.path.join(self.be.sourcedir, self.getGitCloneDirectory(giturl, commit))
logger.debug("localhostbecontroller: giturl %s:%s checking out in current directory %s" % (giturl, commit, localdirname))
@@ -198,6 +209,7 @@ class LocalhostBEController(BuildEnvironmentController):
if name != "bitbake":
layerlist.append(localdirpath.rstrip("/"))
self.setCloneStatus(bitbake,'complete',clone_total,clone_count)
logger.debug("localhostbecontroller: current layer list %s " % pformat(layerlist))
# 5. create custom layer and add custom recipes to it